Исходный код СУБД RuDB — свободной СУБД с открытым исходным кодом на базе PostgreSQL
rudb
2 days ago bd039d1e92813358c5c5a1e346b49074baf513f2
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
38
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# --------------------------------------------------------------------------
 
import os
 
from setuptools import Extension, setup  # noqa: F401
from torch.utils import cpp_extension
 
source_filenames = [
    "torch_interop_utils.cc",
    "ctx_pool.cc",
    "custom_function_bw.cc",
    "custom_function_fw.cc",
    "custom_function_shared.cc",
]
 
cur_file_dir = os.path.dirname(__file__)
 
header_filenames = [
    # "/usr/local/cuda/include/", # uncomment this line to build nvtx support,
    cur_file_dir,
]
 
extra_compile_args = {"cxx": ["-O3", "-std=c++17"]}
setup(
    name="torch_interop_utils",
    ext_modules=[
        cpp_extension.CppExtension(
            name="torch_interop_utils",
            sources=[os.path.join(cur_file_dir, filename) for filename in source_filenames],
            extra_compile_args=extra_compile_args,
            include_dirs=header_filenames,
        )
    ],
    cmdclass={"build_ext": cpp_extension.BuildExtension},
)