From 6092edebde83d2ac0e81f90d4ed25924af10f169 Mon Sep 17 00:00:00 2001 From: project6-dev Date: Thu, 13 Aug 2026 11:37:10 +0000 Subject: [PATCH] fix: import torch.utils.cpp_extension explicitly in build script --- qwen3_6_scripts/build_cccl_moe_sort_scatter.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qwen3_6_scripts/build_cccl_moe_sort_scatter.sh b/qwen3_6_scripts/build_cccl_moe_sort_scatter.sh index 532fa0c7..2d351837 100755 --- a/qwen3_6_scripts/build_cccl_moe_sort_scatter.sh +++ b/qwen3_6_scripts/build_cccl_moe_sort_scatter.sh @@ -20,8 +20,8 @@ done [[ -n "${CXX}" ]] || { echo "no corex clang++"; exit 2; } # Find torch paths -TORCH_INC=$(python3 -c "import torch; print(torch.utils.cpp_extension.include_paths()[0])") -TORCH_LIB=$(python3 -c "import torch.utils.cpp_extension as e; import os; print(os.path.join(os.path.dirname(e.__file__), '..', '..', 'lib'))" | xargs realpath) +TORCH_INC=$(python3 -c "from torch.utils.cpp_extension import include_paths; print(include_paths()[0])") +TORCH_LIB=$(python3 -c "import torch; import os; print(os.path.join(os.path.dirname(torch.__file__), 'lib'))") PYTHON_INC=$(python3 -c "from sysconfig import get_paths; print(get_paths()['include'])") CUDA_INC="/usr/local/corex/include"