Skip to content

Distributing without CUDA #136

Answered by jdarpinian
jdarpinian asked this question in Q&A
Discussion options

You must be logged in to vote

Well I got it working by adding this code to setup.py:

# Build for every supported architecture since 10-series (Pascal)
for arch in ["60", "61", "62", "70", "72", "75", "80", "86", "87", "89", "90", "90a"]:
    extra_compile_args["nvcc"].extend(["-gencode", f"arch=compute_{arch},code=sm_{arch}"])

# Build latest available PTX version, will run on any future GPU
extra_compile_args["nvcc"].extend(["-gencode", f"arch=compute_90,code=compute_90"])

Overkill, sure, but the resulting binary is only 70 MB, a lot less than e.g. cublas, so I guess it's fine!

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jdarpinian
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants