Skip to content

从源码编译通过,但最后import报错 #116

@LRC-bit

Description

@LRC-bit

musa_toolkits:
{
"version": "4.1.0",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "9a3dd9fad4c5c80a64c2badc6228480cde5e7aac",
"commit date": "2025-05-14 14:45:36 +0800"
}
CUB:
{
"version": "1.12.1",
"git branch": "musa-1.12.1",
"commit id": "5ffbaa4336090806eacfb46394cc8b66cea2b0e5",
"commit date": "2024-09-13 16:27:37 +0800"
}
mccl:
{
"version": "2.11.4",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "ed80d0091d5f505f516b9fa5f03680dcdac48bc8",
"commit date": "2025-05-24 23:23:34 +0800"
}
mcc:
{
"version": "3.1.0",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "09c5fd23119eb15df6bbb0830315e8eec150fb2b",
"commit date": "2025-05-22 10:23:17 +0800"
}
mublas:
{
"version": "1.6.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "20250513_develop",
"commit id": "c5b3984f18c599c3f717f6d7f70709ff1d5bbd0f",
"commit date": "2025-05-12 18:01:22 +0800"
}
mudnn:
{
"version": "2.9.0",
"git branch": "release_musa_4.1.1",
"git tag": "20250520_develop",
"commit id": "d84ca85f5a1b5d1e65615c676428bdb50a394053",
"commit date": "2025-05-19 14:06:15 +0800"
}
mufft:
{
"version": "1.6.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "20250106_develop",
"commit id": "cb1988fbd7d2bc65c61c17fe9dfcc40de3b3da3b",
"commit date": "2025-01-04 11:22:52 +0800"
}
muPP:
{
"version": "1.7.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "20250304_release_M1000_1.2.0",
"commit id": "f0e7e1c596943e2fe98e14ff096e3c2f2c877247",
"commit date": "2024-08-23 10:42:21 +0800"
}
MUPTI:
{
"version": "0.7.5",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "dbcf687d75aae1a91270c77247c9e480db9651d9",
"commit date": "2025-05-15 22:17:02 -0400"
}
murand:
{
"version": "1.0.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "d80c1179ba7baff00bbf41e4b5c28859643e1186",
"commit date": "2024-11-25 19:27:45 +0800"
}
musify:
{
"version": "1.0.0",
"git branch": "release_musa_4.1.1",
"git tag": "20250326_release_3.0.0_musa4.0.1",
"commit id": "73db8943bfd432af025c079fb360c1d608370027",
"commit date": "2025-01-23 15:12:26 +0800"
}
musolver:
{
"version": "1.0.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "6a4b7fc4a74f7bdacef53f6989993aa4e5e7ed24",
"commit date": "2025-03-13 14:33:04 +0800"
}
musparse:
{
"version": "1.1.0",
"build archs": "22",
"git branch": "release_musa_4.1.1",
"git tag": "No tag",
"commit id": "b0ad53b692ace10865034f228111155be93bce71",
"commit date": "2024-11-25 19:29:58 +0800"
}
Thrust:
{
"version": "1.12.1",
"git branch": "musa-1.12.1",
"commit id": "4fd436118a26b894b4636ffeee109e90553490fe",
"commit date": "2025-05-23 21:03:42 +0800"
}
musa_runtime:
{
"version": "4.1.0",
"git branch": "HEAD",
"git tag": "No tag",
"commit id": "e16cd7e27472d28264da1095b75b6766e0cd957f",
"commit date": "2025-05-20 21:02:06 +0800"
}

mthreads-gmi
Sun Dec 7 06:32:24 2025

mthreads-gmi:2.1.0           Driver Version:3.0.0-rc-KuaE2.0

ID Name |PCIe |%GPU Mem
Device Type |Pcie Lane Width |Temp MPC Capable
| ECC Mode
+-------------------------------------------------------------+
0 MTT S4000 |00000000:16:00.0 |0% 519MiB(49152MiB)
Physical |16x(16x) |56C YES
| N/A
+-------------------------------------------------------------+
1 MTT S4000 |00000000:27:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |48C YES
| N/A
+-------------------------------------------------------------+
2 MTT S4000 |00000000:38:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |45C YES
| N/A
+-------------------------------------------------------------+
3 MTT S4000 |00000000:49:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |46C YES
| N/A
+-------------------------------------------------------------+
4 MTT S4000 |00000000:98:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |45C YES
| N/A
+-------------------------------------------------------------+
5 MTT S4000 |00000000:a8:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |45C YES
| N/A
+-------------------------------------------------------------+
6 MTT S4000 |00000000:b8:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |45C YES
| N/A
+-------------------------------------------------------------+
7 MTT S4000 |00000000:d8:00.0 |0% 3MiB(49152MiB)
Physical |16x(16x) |45C YES
| N/A


Processes:
ID PID Process name GPU Memory
Usage
+-------------------------------------------------------------+
No running processes found

Python 3.10.19 | packaged by conda-forge | (main, Oct 22 2025, 22:29:10) [GCC 14.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Ctrl click to launch VS Code Native REPL

import torch
device init failed!
CreatePlatform failed!
/home/server/miniconda3/envs/lrc/lib/python3.10/site-packages/torch_musa-2.5.0-py3.10-linux-x86_64.egg/torch_musa/core/device.py:170: UserWarning: MUSA initialization: Unexpected error from musaGetDeviceCount(). Did you run some musa functions before calling NumMusaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW (Triggered internally at /mnt/data0/lab408/linruichen/torch_musa/torch_musa/csrc/core/MUSAFunctions.cpp:93.)
return torch_musa._MUSAC._musa_getDeviceCount()
No MUSA runtime is found, using MUSA_HOME='/usr/local/musa'
print("PyTorch version:", torch.version)
PyTorch version: 2.5.0
import torch_musa
print("PyTorch version:", torch_musa.version)
PyTorch version: 2.5.0+cf09ec6
a = torch.tensor([1.2, 2.3], dtype=torch.float32, device='musa')
Traceback (most recent call last):
File "", line 1, in
File "/home/server/miniconda3/envs/lrc/lib/python3.10/site-packages/torch_musa-2.5.0-py3.10-linux-x86_64.egg/torch_musa/core/_lazy_init.py", line 118, in _lazy_init
torch_musa._MUSAC._musa_init()
RuntimeError: Unexpected error from musaGetDeviceCount(). Did you run some musa functions before calling NumMusaDevices() that might have already set an error? Error 804: forward compatibility was attempted on non supported HW

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions