This repository was archived by the owner on Apr 28, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,9 @@ std::unique_ptr<CudaRTCFunction> CudaRTCFunction::Compile(
113
113
res->nvrtc_ptx = std::vector<char >(ptx_size);
114
114
TC_NVRTC_CHECK (nvrtcGetPTX (prog, res->nvrtc_ptx .data ()));
115
115
TC_NVRTC_CHECK (nvrtcDestroyProgram (&prog));
116
-
116
+ if (FLAGS_dump_ptx) {
117
+ LOG (INFO) << " PTX:\n " << std::string (res->nvrtc_ptx .data ());
118
+ }
117
119
return res;
118
120
}
119
121
namespace {
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ DEFINE_bool(
36
36
false ,
37
37
" Print debug spew for the tc_mapper like cuda code, mapping options etc" );
38
38
DEFINE_bool (dump_cuda, false , " Print the generated source" );
39
+ DEFINE_bool (dump_ptx, false , " Dump the generated PTX" );
39
40
40
41
// CPU codegen options
41
42
DEFINE_bool (llvm_dump_before_opt, false , " Print IR before optimization" );
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ DECLARE_bool(debug_tc_mapper);
29
29
DECLARE_bool (debug_cuda);
30
30
DECLARE_bool (debug_tuner);
31
31
DECLARE_bool (dump_cuda);
32
+ DECLARE_bool (dump_ptx);
32
33
33
34
// llvm codegen
34
35
DECLARE_bool (llvm_dump_before_opt);
You can’t perform that action at this time.
0 commit comments