Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 7a11fca

Browse files
Make exported classes local to the module
This will be required to have 2 sets of bindings living side by side and avoid creating type conflicts in pybind.
1 parent bb78adb commit 7a11fca

File tree

1 file changed

+5
-3
lines changed
  • tensor_comprehensions/pybinds

1 file changed

+5
-3
lines changed

tensor_comprehensions/pybinds/tc.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ PYBIND11_MODULE(tc, m) {
106106
m.def(
107107
"set_dump_cuda", [](bool dump_cuda) { tc::FLAGS_dump_cuda = dump_cuda; });
108108

109-
py::class_<ATenCudaTuner>(m, "ATenCudaTuner")
109+
py::class_<ATenCudaTuner>(m, "ATenCudaTuner", py::module_local())
110110
.def(py::init<const std::string>())
111111
.def(
112112
"pop_size",
@@ -204,7 +204,8 @@ PYBIND11_MODULE(tc, m) {
204204
numCandidates);
205205
});
206206

207-
py::class_<ATenCudaCompilationUnit>(m, "ATenCompilationUnit")
207+
py::class_<ATenCudaCompilationUnit>(
208+
m, "ATenCompilationUnit", py::module_local())
208209
.def(py::init<>())
209210
.def("define", &ATenCudaCompilationUnit::define, "Define the TC language")
210211
.def(
@@ -255,7 +256,8 @@ PYBIND11_MODULE(tc, m) {
255256
py::class_<tc::CudaMappingOptions>(
256257
m,
257258
"CudaMappingOptions",
258-
"MappingCudaMappingOptions for a Tensor Comprehensions (TC)")
259+
"CudaMappingOptions for a Tensor Comprehensions (TC)",
260+
py::module_local())
259261
.def(
260262
py::init([](std::string type) {
261263
if (type == "naive") {

0 commit comments

Comments
 (0)