-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
35 lines (34 loc) · 1007 Bytes
/
setup.py
File metadata and controls
35 lines (34 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
setup(
name="my_custom_cuda_ops",
ext_modules=[
CUDAExtension(
"rmsnorm_kernel_vectorized",
sources=["kernels/CUDA/rmsnnorm_binding.cu"],
extra_compile_args={
"cxx": [],
"nvcc": [
"-O3",
"-gencode",
"arch=compute_80,code=sm_80",
"--expt-relaxed-constexpr",
],
},
),
CUDAExtension(
"rope_cuda",
sources=["kernels/CUDA/rope_binding.cu"],
extra_compile_args={
"cxx": [],
"nvcc": [
"-O3",
"-gencode",
"arch=compute_80,code=sm_80",
"--expt-relaxed-constexpr",
],
},
),
],
cmdclass={"build_ext": BuildExtension},
)