forked from NVIDIA/cutlass
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathsetup.py
executable file
·35 lines (32 loc) · 1.13 KB
/
setup.py
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
#!/usr/bin/env python3
import os
from setuptools import setup
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
CUTLASS_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
setup(
name='depthwise_conv2d_implicit_gemm',
py_modules=['depthwise_conv2d_implicit_gemm'],
ext_modules=[
CUDAExtension(
name='_depthwise_conv2d_implicit_gemm_C',
sources=[
"frontend.cpp",
"forward_fp32.cu",
"backward_data_fp32.cu",
"backward_filter_fp32.cu",
"forward_fp16.cu",
"backward_data_fp16.cu",
"backward_filter_fp16.cu",
],
include_dirs=[
".",
os.path.join(CUTLASS_ROOT, "include"),
os.path.join(CUTLASS_ROOT, "tools", "library", "include"),
os.path.join(CUTLASS_ROOT, "tools", "util", "include"),
os.path.join(CUTLASS_ROOT, "examples", "common"),
],
extra_compile_args=['-g']),
],
cmdclass={
'build_ext': BuildExtension
})