From 2a4cfbd78110a7d547f6f1aaba3458d44610caab Mon Sep 17 00:00:00 2001 From: shawnw Date: Tue, 18 Feb 2020 15:33:34 +0800 Subject: [PATCH 1/2] Fix marker string --- nvtx_plugins/python/nvtx/plugins/tf/base_callbacks.py | 2 +- nvtx_plugins/python/nvtx/plugins/tf/estimator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nvtx_plugins/python/nvtx/plugins/tf/base_callbacks.py b/nvtx_plugins/python/nvtx/plugins/tf/base_callbacks.py index 3507e59..2096ba0 100644 --- a/nvtx_plugins/python/nvtx/plugins/tf/base_callbacks.py +++ b/nvtx_plugins/python/nvtx/plugins/tf/base_callbacks.py @@ -30,7 +30,7 @@ def __init__(self): def open_marker(self, message): if self.marker_ids.get(message, None) is None: self.marker_ids[message] = [] - marker = self.libnvtx.nvtxRangeStartW(message) + marker = self.libnvtx.nvtxRangeStartA(bytes(message, encoding="ascii")) self.marker_ids[message].append(marker) def close_marker(self, message): diff --git a/nvtx_plugins/python/nvtx/plugins/tf/estimator.py b/nvtx_plugins/python/nvtx/plugins/tf/estimator.py index 7c6d1cf..b35fc96 100644 --- a/nvtx_plugins/python/nvtx/plugins/tf/estimator.py +++ b/nvtx_plugins/python/nvtx/plugins/tf/estimator.py @@ -33,7 +33,7 @@ def __init__(self, skip_n_steps=0, name=None): self.name = name self.step_counter = 0 self.skip_n_steps = skip_n_steps - self.iteration_message = 'step {iter}' + self.iteration_message = 'step{iter}' def begin(self): self.step_counter = 0 From 12ea33203cc18ccd546f835e228359e3eecbdb14 Mon Sep 17 00:00:00 2001 From: shawnw Date: Tue, 18 Feb 2020 15:36:12 +0800 Subject: [PATCH 2/2] add install script --- install.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 install.sh diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..52a87ba --- /dev/null +++ b/install.sh @@ -0,0 +1,2 @@ +python setup.py sdist +pip install dist/nvtx-plugins*.tar.gz