Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead code that prevents easy installation in Dockerfile without access to CUDA runtime #21

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions csrc/flashfftconv/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CUDA_HOME
import subprocess

def get_last_arch_torch():
arch = torch.cuda.get_arch_list()[-1]
print(f"Found arch: {arch} from existing torch installation")
return arch

def get_cuda_bare_metal_version(cuda_dir):
raw_output = subprocess.check_output([cuda_dir + "/bin/nvcc", "-V"], universal_newlines=True)
output = raw_output.split()
Expand All @@ -24,12 +19,8 @@ def append_nvcc_threads(nvcc_extra_args):
return nvcc_extra_args + ["--threads", "4"]
return nvcc_extra_args

arch = get_last_arch_torch()
# [MP] make install more flexible here
sm_num = arch[-2:]
cc_flag = ['--generate-code=arch=compute_80,code=compute_80']


setup(
name='monarch_cuda',
ext_modules=[
Expand Down Expand Up @@ -72,4 +63,4 @@ def append_nvcc_threads(nvcc_extra_args):
url='https://github.com/HazyResearch/flash-fft-conv',
author='Dan Fu, Hermann Kumbong',
author_email='[email protected]',
license='Apache 2.0')
license='Apache 2.0')