已合并
关闭torch自动加载后端组件(torch_npu等组件),修复只安装toolkit包报错找不到libhccl.so问题 #233
chen-shuai创建于 5月8日
关闭torch自动加载后端组件(torch_npu等组件),修复只安装toolkit包报错找不到libhccl.so问题 #233
已合并
共 15 个文件变更+37-0
| @@ -15,6 +15,8 @@ import math | |||
| 15 | import os | 15 | import os |
| 16 | import sys | 16 | import sys |
| 17 | 17 | ||
| 18 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 19 | + | ||
| 18 | import numpy as np | 20 | import numpy as np |
| 19 | import torch | 21 | import torch |
| 20 | from en_dtypes import float8_e8m0 | 22 | from en_dtypes import float8_e8m0 |
| @@ -8,8 +8,11 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | 13 | ||
| 14 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 15 | + | ||
| 13 | import numpy as np | 16 | import numpy as np |
| 14 | import torch | 17 | import torch |
| 15 | 18 | ||
MSamples/2_Performance/grouped_matmul_story/grouped_matmul_recipes/examples/quant_grouped_matmul_mxfp4/scripts/gen_data.py+2-0
| @@ -16,6 +16,8 @@ import os | |||
| 16 | import sys | 16 | import sys |
| 17 | from typing import List, Tuple | 17 | from typing import List, Tuple |
| 18 | 18 | ||
| 19 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 20 | + | ||
| 19 | import numpy as np | 21 | import numpy as np |
| 20 | import torch | 22 | import torch |
| 21 | from en_dtypes import float8_e8m0 | 23 | from en_dtypes import float8_e8m0 |
MSamples/2_Performance/grouped_matmul_story/grouped_matmul_recipes/examples/quant_grouped_matmul_mxfp4/scripts/verify_result.py+3-0
| @@ -8,9 +8,12 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | from typing import List | 13 | from typing import List |
| 13 | 14 | ||
| 15 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 16 | + | ||
| 14 | import numpy as np | 17 | import numpy as np |
| 15 | import torch | 18 | import torch |
| 16 | 19 | ||
MSamples/2_Performance/grouped_matmul_story/grouped_matmul_recipes/examples/quant_grouped_matmul_mxfp8/scripts/gen_data.py+2-0
| @@ -16,6 +16,8 @@ import os | |||
| 16 | import sys | 16 | import sys |
| 17 | from typing import List, Tuple | 17 | from typing import List, Tuple |
| 18 | 18 | ||
| 19 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 20 | + | ||
| 19 | import numpy as np | 21 | import numpy as np |
| 20 | import torch | 22 | import torch |
| 21 | from en_dtypes import float8_e8m0 | 23 | from en_dtypes import float8_e8m0 |
MSamples/2_Performance/grouped_matmul_story/grouped_matmul_recipes/examples/quant_grouped_matmul_mxfp8/scripts/verify_result.py+3-0
| @@ -8,9 +8,12 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | from typing import List | 13 | from typing import List |
| 13 | 14 | ||
| 15 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 16 | + | ||
| 14 | import numpy as np | 17 | import numpy as np |
| 15 | import torch | 18 | import torch |
| 16 | 19 | ||
MSamples/2_Performance/grouped_matmul_story/grouped_matmul_recipes/examples/weight_quant_grouped_matmul_mxfp8fp4/scripts/gen_data.py+2-0
| @@ -17,6 +17,8 @@ import sys | |||
| 17 | from concurrent.futures import ThreadPoolExecutor | 17 | from concurrent.futures import ThreadPoolExecutor |
| 18 | from typing import List, Tuple | 18 | from typing import List, Tuple |
| 19 | 19 | ||
| 20 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 21 | + | ||
| 20 | import numpy as np | 22 | import numpy as np |
| 21 | from en_dtypes import float8_e8m0 | 23 | from en_dtypes import float8_e8m0 |
| 22 | from ml_dtypes import float4_e2m1fn, float8_e4m3fn | 24 | from ml_dtypes import float4_e2m1fn, float8_e4m3fn |
| @@ -14,6 +14,8 @@ | |||
| 14 | import os | 14 | import os |
| 15 | import sys | 15 | import sys |
| 16 | 16 | ||
| 17 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 18 | + | ||
| 17 | import numpy as np | 19 | import numpy as np |
| 18 | import torch | 20 | import torch |
| 19 | from ml_dtypes import bfloat16 | 21 | from ml_dtypes import bfloat16 |
MSamples/2_Performance/matmul_story/matmul_recipes/examples/matmul_a16w16/scripts/verify_result.py+3-0
| @@ -8,8 +8,11 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | 13 | ||
| 14 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 15 | + | ||
| 13 | import numpy as np | 16 | import numpy as np |
| 14 | import torch | 17 | import torch |
| 15 | 18 | ||
MSamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/scripts/gen_data.py+2-0
| @@ -15,6 +15,8 @@ import math | |||
| 15 | import os | 15 | import os |
| 16 | import sys | 16 | import sys |
| 17 | 17 | ||
| 18 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 19 | + | ||
| 18 | import numpy as np | 20 | import numpy as np |
| 19 | import torch | 21 | import torch |
| 20 | from en_dtypes import float8_e8m0 | 22 | from en_dtypes import float8_e8m0 |
MSamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/scripts/verify_result.py+3-0
| @@ -8,8 +8,11 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | 13 | ||
| 14 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 15 | + | ||
| 13 | import numpy as np | 16 | import numpy as np |
| 14 | import torch | 17 | import torch |
| 15 | 18 | ||
MSamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp8/scripts/gen_data.py+2-0
| @@ -15,6 +15,8 @@ import math | |||
| 15 | import os | 15 | import os |
| 16 | import sys | 16 | import sys |
| 17 | 17 | ||
| 18 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 19 | + | ||
| 18 | import numpy as np | 20 | import numpy as np |
| 19 | import torch | 21 | import torch |
| 20 | from en_dtypes import float8_e8m0 | 22 | from en_dtypes import float8_e8m0 |
MSamples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp8/scripts/verify_result.py+3-0
| @@ -8,8 +8,11 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | 13 | ||
| 14 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 15 | + | ||
| 13 | import numpy as np | 16 | import numpy as np |
| 14 | import torch | 17 | import torch |
| 15 | 18 | ||
| @@ -15,6 +15,8 @@ import math | |||
| 15 | import os | 15 | import os |
| 16 | import sys | 16 | import sys |
| 17 | 17 | ||
| 18 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 19 | + | ||
| 18 | import numpy as np | 20 | import numpy as np |
| 19 | import torch | 21 | import torch |
| 20 | from en_dtypes import float8_e8m0 | 22 | from en_dtypes import float8_e8m0 |
| @@ -8,8 +8,11 @@ | |||
| 8 | # See LICENSE in the root of the software repository for the full text of the License. | 8 | # See LICENSE in the root of the software repository for the full text of the License. |
| 9 | # ---------------------------------------------------------------------------------------------------------- | 9 | # ---------------------------------------------------------------------------------------------------------- |
| 10 | 10 | ||
| 11 | +import os | ||
| 11 | import sys | 12 | import sys |
| 12 | 13 | ||
| 14 | +os.environ["TORCH_DEVICE_BACKEND_AUTOLOAD"] = "0" | ||
| 15 | + | ||
| 13 | import numpy as np | 16 | import numpy as np |
| 14 | import torch | 17 | import torch |
| 15 | 18 | ||