未验证 提交 340009d6 编写于 作者: Y Yuanle Liu 提交者: GitHub

fix nvprof_nvtx_push interface bug (#47232)

* fix nvprof_nvtx_push interface bug
上级 1c8ef38e
......@@ -42,7 +42,7 @@ enum class NvtxRangeColor : uint32_t {
};
void CudaNvtxRangePush(const std::string& name,
const NvtxRangeColor color = NvtxRangeColor::Blue);
const NvtxRangeColor color = NvtxRangeColor::Green);
void CudaNvtxRangePop();
#endif
......
......@@ -2063,7 +2063,9 @@ All parameter, weight, gradient are variables in Paddle.
m.def("nvprof_init", platform::CudaProfilerInit);
m.def("nvprof_start", platform::CudaProfilerStart);
m.def("nvprof_stop", platform::CudaProfilerStop);
m.def("nvprof_nvtx_push", platform::CudaNvtxRangePush);
m.def("nvprof_nvtx_push", [](const std::string &name) {
platform::CudaNvtxRangePush(name, platform::NvtxRangeColor::Green);
});
m.def("nvprof_nvtx_pop", platform::CudaNvtxRangePop);
m.def("nvprof_enable_record_event", platform::NvprofEnableRecordEvent);
m.def("nvprof_disable_record_event", platform::NvprofDisableRecordEvent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册