4343├── relu_kernel
4444│ └── relu.cu
4545└── torch-ext
46- └── torch_bindings .cpp
47- └── torch_bindings .h
46+ └── torch_binding .cpp
47+ └── torch_binding .h
4848 └── relu
4949 └── __init__.py
5050```
@@ -54,9 +54,9 @@ In this example we can find:
5454- The build configuration in ` build.toml ` .
5555- One or more top-level directories containing kernels (` relu_kernel ` ).
5656- The ` torch-ext ` directory, which contains:
57- - ` torch_bindings .h` : contains declarations for kernel entry points
57+ - ` torch_binding .h` : contains declarations for kernel entry points
5858 (from ` kernel_a ` and ` kernel_b ` ).
59- - ` torch_bindings .cpp` : registers the entry points as Torch ops.
59+ - ` torch_binding .cpp` : registers the entry points as Torch ops.
6060 - ` torch_ext/relu ` : contains any Python wrapping the kernel needs. At the
6161 bare minimum, it should contain an ` __init__.py ` file.
6262
@@ -139,11 +139,11 @@ for an example with multiple kernel sections.
139139
140140Torch bindings are defined in C++, kernels commonly use two files:
141141
142- - ` torch_bindings .h` containing function declarations.
143- - ` torch_bindings .cpp` registering the functions as Torch ops.
142+ - ` torch_binding .h` containing function declarations.
143+ - ` torch_binding .cpp` registering the functions as Torch ops.
144144
145145For instance, the ` relu ` kernel has the following declaration in
146- ` torch_bindings .h` :
146+ ` torch_binding .h` :
147147
148148``` cpp
149149#pragma once
@@ -190,7 +190,7 @@ void relu(torch::Tensor &out,
190190}
191191```
192192
193- This function is then registered as a Torch op in ` torch_bindings .cpp` :
193+ This function is then registered as a Torch op in ` torch_binding .cpp` :
194194
195195``` cpp
196196#include < torch/library.h>
0 commit comments