test.cpp
#include <torch/extension.h>// 定义一个简单的加法函数
at::Tensor add(at::Tensor a, at::Tensor b) {return a b;
}PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {m.def("add", &add, "Add two tensors");
}test.py
import torch
…
AI Repos
1、OpenHands OpenHands(前身为OpenDevin)是一个由AI驱动的软件开发代理平台,它能够像人类开发者一样修改代码、运行命令、浏览网页、调用API,甚至从StackOverflow复制代码片段。用户可以通过OpenHands Cloud轻松上手&a…