Skip to content

Commit 1f79d9c

Browse files
authored
Add --cuda-event-trace=false to nsys command (#180)
* Set cuda event trace to false in nsys Signed-off-by: Guyue Huang <[email protected]> * Formatting Signed-off-by: Guyue Huang <[email protected]> --------- Signed-off-by: Guyue Huang <[email protected]>
1 parent 11c8bf0 commit 1f79d9c

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

nemo_run/core/execution/launcher.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ class Launcher(ConfigurableMixin):
1414
nsys_profile: bool = False
1515
nsys_folder: str = "nsys_profile"
1616
nsys_trace: list[str] = field(default_factory=lambda: ["nvtx", "cuda"])
17+
nsys_extra_args: list[str] = field(
18+
default_factory=lambda: [
19+
"--force-overwrite=true",
20+
"--capture-range=cudaProfilerApi",
21+
"--capture-range-end=stop",
22+
"--cuda-graph-trace=node",
23+
"--cuda-event-trace=false",
24+
]
25+
)
1726

1827
def get_nsys_prefix(self, profile_dir: str) -> Optional[list[str]]:
1928
"""Make a command prefix for nsys profiling"""
@@ -27,12 +36,7 @@ def get_nsys_prefix(self, profile_dir: str) -> Optional[list[str]]:
2736
",".join(self.nsys_trace),
2837
"-o",
2938
f"{profile_out_path}/profile_%p",
30-
"--force-overwrite",
31-
"true",
32-
"--capture-range=cudaProfilerApi",
33-
"--capture-range-end=stop",
34-
"--cuda-graph-trace=node",
35-
]
39+
] + self.nsys_extra_args
3640
return args
3741

3842
def transform(self, cmd: list[str]) -> Optional[Script]: ...

nemo_run/package_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
from packaging.version import Version
1515

16-
__version__ = '0.5.0rc0.dev0'
16+
__version__ = "0.5.0rc0.dev0"
1717

1818
MAJOR = Version(__version__).major
1919
MINOR = Version(__version__).minor

test/core/execution/test_slurm_templates.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,11 @@ def test_dummy_batch_request_nsys(
470470
"nvtx,cuda",
471471
"-o",
472472
"/nemo_run/nsys_profile/profile_%p",
473-
"--force-overwrite",
474-
"true",
473+
"--force-overwrite=true",
475474
"--capture-range=cudaProfilerApi",
476475
"--capture-range-end=stop",
477476
"--cuda-graph-trace=node",
477+
"--cuda-event-trace=false",
478478
]
479479

480480
def test_dummy_batch_request_warn(

0 commit comments

Comments
 (0)