aimol.tensorvia
importTensorvia: C++23 module tensor library with CPU, Vulkan, CUDA and SYCL backends
import tensorvia;
模块名取自本索引给这个包写的测试项目。
mcpp add aimol.tensorvia@0.3.2
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// aimol.tensorvia smoke: import the module, run CPU ops, and read back
// scalars. Every check can fail; a non-zero exit is the signal.
import std;
import tensorvia;
namespace {
int failures = 0;
void check(bool ok, std::string_view what) {
if (!ok) {
std::println("FAIL: {}", what);
++failures;
}
}
} // namespace
int main() {
const Tensor ones = ops::Ones({4, 4}, DataType::FLOAT32);
check(ops::Sum(ones).item<float>() == 16.0f, "Sum(Ones(4x4)) == 16");
// …
tests/examples/tensorvia/tests/smoke.cpp · 项目 tests/examples/tensorvia
构建 · 上游清单
- targets
tensorvia (shared), cnn_inference (bin)- language
c++23- manifest version
0.3.2- dependencies
compat- 来源
https://raw.githubusercontent.com/Aimol-l/Tensorvia/v0.3.2/mcpp.toml
版本
| 版本 | 平台 | 镜像 | sha256 |
|---|---|---|---|
0.3.2 最新 |
LinuxWindows | 源站 | f5170e419fa4… |