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

Commit 012e970

Browse files
nicolasvasilacheftynse
authored andcommitted
Expose dump_ptx flag to Python
1 parent 21ed914 commit 012e970

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

tensor_comprehensions/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from tensor_comprehensions.tclib import debug_tc_mapper
2929
from tensor_comprehensions.tclib import debug_tuner
3030
from tensor_comprehensions.tclib import dump_cuda
31+
from tensor_comprehensions.tclib import dump_ptx
3132

3233
from tensor_comprehensions.tclib import CompilationCache
3334
from tensor_comprehensions.tclib import MappingOptions
@@ -604,6 +605,7 @@ def make_autograd(forward_fun: Callable[[Iterable[torch.Tensor]], Iterable[torch
604605
'debug_tc_mapper',
605606
'debug_tuner',
606607
'dump_cuda',
608+
'dump_ptx',
607609
# Functions exposed by the tclib
608610
'compile',
609611
'autotune',

tensor_comprehensions/pybinds/tclib.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,7 @@ PYBIND11_MODULE(tclib, m) {
438438
tc::FLAGS_debug_tuner = debug_tuner;
439439
});
440440
m.def("dump_cuda", [](bool dump_cuda) { tc::FLAGS_dump_cuda = dump_cuda; });
441+
m.def("dump_ptx", [](bool dump_ptx) { tc::FLAGS_dump_ptx = dump_ptx; });
441442

442443
// Access the names of the defs in a TC string
443444
m.def("parse_defs", [](const std::string& tc) {

0 commit comments

Comments
 (0)