2
运行时
提问帖
有回复
ort 开发中 device_name 设置的问题
2026-06-03 00:25:24
50
static Ort::MemoryInfo MemoryInfo(const TensorDesc& desc) { const char* device_name = desc.device.is_host() ? "Cpu" : "Rocm"; //const char* device_name = "Cpu"; //printf("device_name = %s\n", device_name); Ort::MemoryInfo memory_info(device_name, OrtDeviceAllocator, desc.device.device_id(), OrtMemTypeDefault); return memory_info; } 海光的 onnxruntime 中 device_name 应该是什么?我是试过 Rocm 会报错。
全部评论(3)
只看楼主
网
网友6f7rQI
3楼
memory info 之中使用cuda
6/9
网
网友6f7rQI
2楼
优先使用cuda
6/9
P
panhb
1楼
https://download.sourcefind.cn:65024/file/4/技术文档/DAS1.1_OnnxRuntime使用手册.pdf 可以先参考下使用手册,如果还不行麻烦发下具体的报错和相关代码吧
6/4
没有更多内容了
--
楼主
Level.1
0 帖子
楼主热帖
暂无数据