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… |