-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
29 lines (27 loc) · 783 Bytes
/
Copy pathsetup.py
File metadata and controls
29 lines (27 loc) · 783 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
from setuptools import setup, find_packages
from torch.utils.cpp_extension import CppExtension, BuildExtension
import torch
from pathlib import Path
torch_include = Path(torch.__file__).parent / "include"
kineto_include = torch_include / "kineto"
setup(
name="torch_stub_gpu",
packages=find_packages(),
ext_modules=[
CppExtension(
name="torch_stub_gpu._C",
sources=["csrc/profiler/StubGpuProfiler.cpp"],
include_dirs=[
str(kineto_include),
],
extra_compile_args=[
"-std=c++17",
"-O0",
"-g",
"-DUSE_KINETO",
"-DFMT_HEADER_ONLY",
],
)
],
cmdclass={"build_ext": BuildExtension},
)