depot/third_party/nixpkgs/pkgs/development/python-modules/openai-triton/0000-dont-download-ptxas.patch
Default email 2c76a4cb41 Project import generated by Copybara.
GitOrigin-RevId: c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad
2023-11-16 04:20:00 +00:00

39 lines
1.3 KiB
Diff

diff --git a/python/setup.py b/python/setup.py
index 2ac3accd2..f26161c72 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -101,25 +101,6 @@ def get_thirdparty_packages(triton_cache_path):
# ---- package data ---
-def download_and_copy_ptxas():
- base_dir = os.path.dirname(__file__)
- src_path = "bin/ptxas"
- url = "https://conda.anaconda.org/nvidia/label/cuda-12.0.0/linux-64/cuda-nvcc-12.0.76-0.tar.bz2"
- dst_prefix = os.path.join(base_dir, "triton")
- dst_suffix = os.path.join("third_party", "cuda", src_path)
- dst_path = os.path.join(dst_prefix, dst_suffix)
- if not os.path.exists(dst_path):
- print(f'downloading and extracting {url} ...')
- ftpstream = urllib.request.urlopen(url)
- file = tarfile.open(fileobj=ftpstream, mode="r|*")
- with tempfile.TemporaryDirectory() as temp_dir:
- file.extractall(path=temp_dir)
- src_path = os.path.join(temp_dir, src_path)
- os.makedirs(os.path.split(dst_path)[0], exist_ok=True)
- shutil.copy(src_path, dst_path)
- return dst_suffix
-
-
# ---- cmake extension ----
@@ -200,8 +181,6 @@ class CMakeBuild(build_ext):
subprocess.check_call(["cmake", "--build", "."] + build_args, cwd=self.build_temp)
-download_and_copy_ptxas()
-
setup(
name="triton",
version="2.0.0",