[THIRD_PARTY] bumped ptxas version to 12.1.105 (#1574)

This commit is contained in:
Philippe Tillet
2023-04-24 16:49:31 -07:00
committed by GitHub
parent 6d226431b1
commit ec242430d1

View File

@@ -108,11 +108,20 @@ def get_thirdparty_packages(triton_cache_path):
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"
version = "12.1.105"
url = f"https://conda.anaconda.org/nvidia/label/cuda-12.1.1/linux-64/cuda-nvcc-{version}-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):
is_linux = platform.system() == "Linux"
download = False
if is_linux:
download = True
if os.path.exists(dst_path):
curr_version = subprocess.check_output([dst_path, "--version"]).decode("utf-8").strip()
curr_version = re.search(r"V([.|\d]+)", curr_version).group(1)
download = curr_version != version
if download:
print(f'downloading and extracting {url} ...')
ftpstream = urllib.request.urlopen(url)
file = tarfile.open(fileobj=ftpstream, mode="r|*")