python312Packages.triton: fix torch.compile (#369495)

authored by Someone and committed by GitHub a914df74 a8f36e39

+10 -1
+10 -1
pkgs/development/python-modules/triton/default.nix
··· 53 } 54 // lib.optionalAttrs rocmSupport { libhipDir = "${lib.getLib rocmPackages.clr}/lib"; } 55 // lib.optionalAttrs cudaSupport { 56 - libcudaStubsDir = "${lib.getLib cudaPackages.cuda_cudart}/lib/stubs"; 57 ccCmdExtraFlags = "-Wl,-rpath,${addDriverRunpath.driverLink}/lib"; 58 } 59 )) ··· 82 substituteInPlace unittest/CMakeLists.txt \ 83 --replace-fail "include (\''${CMAKE_CURRENT_SOURCE_DIR}/googletest.cmake)" ""\ 84 --replace-fail "include(GoogleTest)" "find_package(GTest REQUIRED)" 85 ''; 86 87 build-system = [ setuptools ];
··· 53 } 54 // lib.optionalAttrs rocmSupport { libhipDir = "${lib.getLib rocmPackages.clr}/lib"; } 55 // lib.optionalAttrs cudaSupport { 56 + libcudaStubsDir = "${lib.getOutput "stubs" cudaPackages.cuda_cudart}/lib/stubs"; 57 ccCmdExtraFlags = "-Wl,-rpath,${addDriverRunpath.driverLink}/lib"; 58 } 59 )) ··· 82 substituteInPlace unittest/CMakeLists.txt \ 83 --replace-fail "include (\''${CMAKE_CURRENT_SOURCE_DIR}/googletest.cmake)" ""\ 84 --replace-fail "include(GoogleTest)" "find_package(GTest REQUIRED)" 85 + 86 + # Patch the source code to make sure it doesn't specify a non-existent PTXAS version. 87 + # CUDA 12.6 (the current default/max) tops out at PTXAS version 8.5. 88 + # NOTE: This is fixed in `master`: 89 + # https://github.com/triton-lang/triton/commit/f48dbc1b106c93144c198fbf3c4f30b2aab9d242 90 + substituteInPlace "$NIX_BUILD_TOP/$sourceRoot/third_party/nvidia/backend/compiler.py" \ 91 + --replace-fail \ 92 + 'return 80 + minor' \ 93 + 'return 80 + min(minor, 5)' 94 ''; 95 96 build-system = [ setuptools ];