danieldk HF Staff commited on
Commit
b865e0f
·
1 Parent(s): 58902b4

Sync with latest kernel-builder changes

Browse files
build.toml CHANGED
@@ -1,19 +1,16 @@
1
  [general]
2
- version = "0.0.1"
3
 
4
  [torch]
5
- name = "get_position_ids"
6
  src = [
7
- "ext-torch/registration.h",
8
  "ext-torch/torch_binding.cpp",
9
  "ext-torch/torch_binding.h",
10
  ]
11
  include = ["."]
12
- pyroot = "ext-torch"
13
  pyext = ["py", "json"]
14
 
15
  [kernel.get_position_ids]
16
- capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
17
  src = ["get_position_ids/get_position_ids.cu"]
18
  include = ["."]
19
  depends = ["torch"]
 
1
  [general]
2
+ name = "get_position_ids"
3
 
4
  [torch]
 
5
  src = [
 
6
  "ext-torch/torch_binding.cpp",
7
  "ext-torch/torch_binding.h",
8
  ]
9
  include = ["."]
 
10
  pyext = ["py", "json"]
11
 
12
  [kernel.get_position_ids]
13
+ cuda-capabilities = ["7.0", "7.2", "7.5", "8.0", "8.6", "8.7", "8.9", "9.0"]
14
  src = ["get_position_ids/get_position_ids.cu"]
15
  include = ["."]
16
  depends = ["torch"]
ext-torch/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
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
{ext-torch → torch-ext}/get_position_ids/__init__.py RENAMED
File without changes
{ext-torch → torch-ext}/torch_binding.cpp RENAMED
File without changes
{ext-torch → torch-ext}/torch_binding.h RENAMED
File without changes