| Machine IP |
10.1.15.176 |
| type |
S5000 |
| test date |
2026.6.8 |
| test fep |
flagos-ai/community#4 |
| docker image |
harbor.baai.ac.cn/flagtree/flagtree-mthreads3.6-py310-torch2.7.1-musa5.1.0-ubuntu22.04:202605-base |
Reproduction command:
1:set up docker
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-mthreads3.6-py310-torch2.7.1-musa5.1.0-ubuntu22.04:202605-base
CONTAINER=flagtree-dev-xxx
docker run -dit
--network=host --pid=host --privileged
--cap-add=SYS_PTRACE
--shm-size 16gb
--security-opt seccomp=unconfined
-e MTHREADS_VISIBLE_DEVICES=all -e MTHREADS_DRIVER_CAPABILITIES=all
-v /usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu
-v /lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu
-v /etc/alternatives:/etc/alternatives
-v /etc/localtime:/etc/localtime:ro
-v /data:/data -v /home:/home -v /tmp:/tmp
-w /root --name ${CONTAINER} ${IMAGE} bash
docker exec -it ${CONTAINER} /bin/bash
2:cd /home git clone https://github.com/flagos-ai/KernelGenBench.git cd /home/KernelGenBench
3:git checkout 0.1.0-rc2
python3 -m pip install -r requirements/requirements_musa.txt
python3 -m pip install -e .
4:root@bm-ctyun-wq-910b-64g-0-31:/home/KernelGenBench# python3 scripts/generate_kernel_and_verify.py
--op-name aten::add
--single-test
--server-type openai
--model-name your-model-name
--max-rounds 3
(Note that this only tests whether the installation is successful. The model name is not replaced, and AI Claude Code is not configured. Any configuration related to Claude Code is considered as passing. Other errors need to have their causes resolved.)
error info:
/usr/local/lib/python3.10/dist-packages/torch_musa/init.py:35: UserWarning: torch version should be v2.7.1 when using torch_musa, but now torch version is 2.9.0+cu128
warnings.warn(
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch_musa/init.py", line 46, in
import torch_musa._MUSAC
ImportError: /usr/local/lib/python3.10/dist-packages/torch_musa/lib/libmusa_kernels.so: undefined symbol: _ZNK3c1010TensorImpl33compute_non_overlapping_and_denseENS0_8identityIbEE
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2833, in _import_device_backends
entrypoint = backend_extension.load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.10/dist-packages/torch_musa/init.py", line 48, in
raise ImportError("Please try running Python from a different directory!") from err
ImportError: Please try running Python from a different directory!
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/KernelGenBench/scripts/generate_kernel_and_verify.py", line 11, in
from kernelgenbench.dataset import TorchOpsLoader, APIInfo
File "/home/KernelGenBench/src/kernelgenbench/init.py", line 2, in
import torch
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2878, in
_import_device_backends()
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2837, in _import_device_backends
raise RuntimeError(
RuntimeError: Failed to load the backend extension: torch_musa. You can disable extension auto-loading with TORCH_DEVICE_BACKEND_AUTOLOAD=0.
Reproduction command:
1:set up docker
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-mthreads3.6-py310-torch2.7.1-musa5.1.0-ubuntu22.04:202605-base
CONTAINER=flagtree-dev-xxx
docker run -dit
--network=host --pid=host --privileged
--cap-add=SYS_PTRACE
--shm-size 16gb
--security-opt seccomp=unconfined
-e MTHREADS_VISIBLE_DEVICES=all -e MTHREADS_DRIVER_CAPABILITIES=all
-v /usr/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu
-v /lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu
-v /etc/alternatives:/etc/alternatives
-v /etc/localtime:/etc/localtime:ro
-v /data:/data -v /home:/home -v /tmp:/tmp
-w /root --name ${CONTAINER} ${IMAGE} bash
docker exec -it ${CONTAINER} /bin/bash
2:cd /home git clone https://github.com/flagos-ai/KernelGenBench.git cd /home/KernelGenBench
3:git checkout 0.1.0-rc2
python3 -m pip install -r requirements/requirements_musa.txt
python3 -m pip install -e .
4:root@bm-ctyun-wq-910b-64g-0-31:/home/KernelGenBench# python3 scripts/generate_kernel_and_verify.py
--op-name aten::add
--single-test
--server-type openai
--model-name your-model-name
--max-rounds 3
(Note that this only tests whether the installation is successful. The model name is not replaced, and AI Claude Code is not configured. Any configuration related to Claude Code is considered as passing. Other errors need to have their causes resolved.)
error info:
/usr/local/lib/python3.10/dist-packages/torch_musa/init.py:35: UserWarning: torch version should be v2.7.1 when using torch_musa, but now torch version is 2.9.0+cu128
warnings.warn(
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch_musa/init.py", line 46, in
import torch_musa._MUSAC
ImportError: /usr/local/lib/python3.10/dist-packages/torch_musa/lib/libmusa_kernels.so: undefined symbol: _ZNK3c1010TensorImpl33compute_non_overlapping_and_denseENS0_8identityIbEE
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2833, in _import_device_backends
entrypoint = backend_extension.load()
File "/usr/lib/python3.10/importlib/metadata/init.py", line 171, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/usr/local/lib/python3.10/dist-packages/torch_musa/init.py", line 48, in
raise ImportError("Please try running Python from a different directory!") from err
ImportError: Please try running Python from a different directory!
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/KernelGenBench/scripts/generate_kernel_and_verify.py", line 11, in
from kernelgenbench.dataset import TorchOpsLoader, APIInfo
File "/home/KernelGenBench/src/kernelgenbench/init.py", line 2, in
import torch
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2878, in
_import_device_backends()
File "/usr/local/lib/python3.10/dist-packages/torch/init.py", line 2837, in _import_device_backends
raise RuntimeError(
RuntimeError: Failed to load the backend extension: torch_musa. You can disable extension auto-loading with TORCH_DEVICE_BACKEND_AUTOLOAD=0.