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

Commit 3476610

Browse files
Drop py::module_local()
This was previously necessary to keep 2 bindings working side by side. It is now unnecessary.
1 parent 8a8370a commit 3476610

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tensor_comprehensions/pybinds/tclib.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,9 @@ PYBIND11_MODULE(tclib, m) {
447447
return res;
448448
});
449449

450-
py::class_<TcExecutor>(m, "TcExecutor", py::module_local())
450+
// Low-level stateful API compile returns an executor on which run and
451+
// unchecked_run can be called.
452+
py::class_<TcExecutor>(m, "TcExecutor")
451453
.def(
452454
"run",
453455
&TcExecutor::run,
@@ -470,7 +472,7 @@ PYBIND11_MODULE(tclib, m) {
470472
});
471473

472474
// A TunerConfig object can be passed to configure a tuning run
473-
py::class_<TunerConfig>(m, "TunerConfig", py::module_local(), R"DOC(
475+
py::class_<TunerConfig>(m, "TunerConfig", R"DOC(
474476
Helper class to manage the behavior of the autotuner
475477
)DOC")
476478
.def(py::init<>())
@@ -535,7 +537,7 @@ PYBIND11_MODULE(tclib, m) {
535537
gflags::GetCommandLineFlagInfoOrDie("stderrthreshold"))
536538
.c_str());
537539

538-
py::class_<Tuner>(m, "Tuner", py::module_local())
540+
py::class_<Tuner>(m, "Tuner")
539541
.def(py::init<std::string>())
540542
.def(py::init<std::string, std::string>())
541543
.def(
@@ -563,8 +565,7 @@ PYBIND11_MODULE(tclib, m) {
563565
}
564566
});
565567

566-
py::class_<MappingOptionsCache>(
567-
m, "MappingOptionsCache", py::module_local(), R"DOC(
568+
py::class_<MappingOptionsCache>(m, "MappingOptionsCache", R"DOC(
568569
Helper class to manipulate cache files containing serialized :class:`MappingOptions <tensor_comprehensions.tclib.MappingOptions>`
569570
)DOC")
570571
.def(py::init<std::string>())
@@ -590,7 +591,7 @@ PYBIND11_MODULE(tclib, m) {
590591
A vector of :class:`MappingOptions <tensor_comprehensions.tclib.MappingOptions>`
591592
)DOC");
592593

593-
py::class_<CompilationCache>(m, "CompilationCache", py::module_local())
594+
py::class_<CompilationCache>(m, "CompilationCache")
594595
.def(py::init<std::string>())
595596
.def("is_compiled", &CompilationCache::isCompiled)
596597
.def("alloc_outputs", &CompilationCache::allocOutputs)

0 commit comments

Comments
 (0)