forked from facebookresearch/FBTT-Embedding
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
37 lines (35 loc) · 1.45 KB
/
Copy pathsetup.py
File metadata and controls
37 lines (35 loc) · 1.45 KB
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
36
37
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from setuptools import setup, find_packages
from torch.utils.cpp_extension import BuildExtension, CUDAExtension
tnn_utils = CUDAExtension(
name='tt_embeddings',
sources=['tt_embeddings.cpp',
'tt_embeddings_cuda.cu',
],
extra_compile_args={
'cxx': [
"-O3",
"-g",
"-DUSE_MKL",
"-m64",
"-mfma",
"-masm=intel",
],
'nvcc':[
"-O3",
"-g",
"--expt-relaxed-constexpr",
"-D__CUDA_NO_HALF_OPERATORS__",
"-I/usr/lib/cub-1.8.0",
"-gencode=arch=compute_70,code=\"sm_70\"",]
}
)
setup(name='tt_embeddings',
description='tt_embeddings',
packages=find_packages(),
ext_modules=[tnn_utils],
cmdclass={'build_ext':BuildExtension},
)