Update for build.toml changes
Browse files- build.toml +5 -8
- torch-ext/registration.h +0 -27
build.toml
CHANGED
|
@@ -1,20 +1,17 @@
|
|
| 1 |
[general]
|
| 2 |
-
|
| 3 |
|
| 4 |
[torch]
|
| 5 |
-
name = "moe"
|
| 6 |
src = [
|
| 7 |
"core/scalar_type.hpp",
|
| 8 |
-
"torch-ext/registration.h",
|
| 9 |
"torch-ext/torch_binding.cpp",
|
| 10 |
"torch-ext/torch_binding.h",
|
| 11 |
]
|
| 12 |
include = ["."]
|
| 13 |
-
pyroot = "torch-ext"
|
| 14 |
pyext = ["py", "json"]
|
| 15 |
|
| 16 |
[kernel.fp8]
|
| 17 |
-
capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 18 |
src = [
|
| 19 |
"cuda_compat.h",
|
| 20 |
"dispatch_utils.h",
|
|
@@ -29,7 +26,7 @@ depends = ["torch"]
|
|
| 29 |
|
| 30 |
|
| 31 |
[kernel.moe]
|
| 32 |
-
capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 33 |
src = [
|
| 34 |
"cuda_compat.h",
|
| 35 |
"dispatch_utils.h",
|
|
@@ -39,7 +36,7 @@ src = [
|
|
| 39 |
depends = ["torch"]
|
| 40 |
|
| 41 |
[kernel.moe-marlin]
|
| 42 |
-
capabilities = ["8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 43 |
src = [
|
| 44 |
"core/exception.hpp",
|
| 45 |
"core/scalar_type.hpp",
|
|
@@ -56,7 +53,7 @@ include = ["."]
|
|
| 56 |
depends = ["torch"]
|
| 57 |
|
| 58 |
[kernel.activation]
|
| 59 |
-
capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 60 |
src = [
|
| 61 |
"activation/activation_kernels.cu",
|
| 62 |
"activation/cuda_compat.h",
|
|
|
|
| 1 |
[general]
|
| 2 |
+
name = "moe"
|
| 3 |
|
| 4 |
[torch]
|
|
|
|
| 5 |
src = [
|
| 6 |
"core/scalar_type.hpp",
|
|
|
|
| 7 |
"torch-ext/torch_binding.cpp",
|
| 8 |
"torch-ext/torch_binding.h",
|
| 9 |
]
|
| 10 |
include = ["."]
|
|
|
|
| 11 |
pyext = ["py", "json"]
|
| 12 |
|
| 13 |
[kernel.fp8]
|
| 14 |
+
cuda-capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 15 |
src = [
|
| 16 |
"cuda_compat.h",
|
| 17 |
"dispatch_utils.h",
|
|
|
|
| 26 |
|
| 27 |
|
| 28 |
[kernel.moe]
|
| 29 |
+
cuda-capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 30 |
src = [
|
| 31 |
"cuda_compat.h",
|
| 32 |
"dispatch_utils.h",
|
|
|
|
| 36 |
depends = ["torch"]
|
| 37 |
|
| 38 |
[kernel.moe-marlin]
|
| 39 |
+
cuda-capabilities = ["8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 40 |
src = [
|
| 41 |
"core/exception.hpp",
|
| 42 |
"core/scalar_type.hpp",
|
|
|
|
| 53 |
depends = ["torch"]
|
| 54 |
|
| 55 |
[kernel.activation]
|
| 56 |
+
cuda-capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
|
| 57 |
src = [
|
| 58 |
"activation/activation_kernels.cu",
|
| 59 |
"activation/cuda_compat.h",
|
torch-ext/registration.h
DELETED
|
@@ -1,27 +0,0 @@
|
|
| 1 |
-
#pragma once
|
| 2 |
-
|
| 3 |
-
#include <Python.h>
|
| 4 |
-
|
| 5 |
-
#define _CONCAT(A, B) A##B
|
| 6 |
-
#define CONCAT(A, B) _CONCAT(A, B)
|
| 7 |
-
|
| 8 |
-
#define _STRINGIFY(A) #A
|
| 9 |
-
#define STRINGIFY(A) _STRINGIFY(A)
|
| 10 |
-
|
| 11 |
-
// A version of the TORCH_LIBRARY macro that expands the NAME, i.e. so NAME
|
| 12 |
-
// could be a macro instead of a literal token.
|
| 13 |
-
#define TORCH_LIBRARY_EXPAND(NAME, MODULE) TORCH_LIBRARY(NAME, MODULE)
|
| 14 |
-
|
| 15 |
-
// A version of the TORCH_LIBRARY_IMPL macro that expands the NAME, i.e. so NAME
|
| 16 |
-
// could be a macro instead of a literal token.
|
| 17 |
-
#define TORCH_LIBRARY_IMPL_EXPAND(NAME, DEVICE, MODULE) \
|
| 18 |
-
TORCH_LIBRARY_IMPL(NAME, DEVICE, MODULE)
|
| 19 |
-
|
| 20 |
-
// REGISTER_EXTENSION allows the shared library to be loaded and initialized
|
| 21 |
-
// via python's import statement.
|
| 22 |
-
#define REGISTER_EXTENSION(NAME) \
|
| 23 |
-
PyMODINIT_FUNC CONCAT(PyInit_, NAME)() { \
|
| 24 |
-
static struct PyModuleDef module = {PyModuleDef_HEAD_INIT, \
|
| 25 |
-
STRINGIFY(NAME), nullptr, 0, nullptr}; \
|
| 26 |
-
return PyModule_Create(&module); \
|
| 27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|