Skip to content

Commit 105b8fe

Browse files
committed
remove nsys
1 parent 3897879 commit 105b8fe

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

src/maxdiffusion/max_utils.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import os
2727
from pathlib import Path
2828
import subprocess
29-
from ctypes import cdll
3029
import numpy as np
3130

3231
import flax
@@ -63,8 +62,6 @@
6362

6463
from google.cloud import storage
6564

66-
libcudart = cdll.LoadLibrary("libcudart.so")
67-
6865
FrozenDict = core.frozen_dict.FrozenDict
6966

7067

@@ -81,18 +78,12 @@ def l2norm_pytree(x):
8178

8279
def activate_profiler(config):
8380
if jax.process_index() == 0 and config.enable_profiler:
84-
if config.profiler == 'nsys':
85-
libcudart.cudaProfilerStart()
86-
else:
87-
jax.profiler.start_trace(config.tensorboard_dir)
81+
jax.profiler.start_trace(config.tensorboard_dir)
8882

8983

9084
def deactivate_profiler(config):
9185
if jax.process_index() == 0 and config.enable_profiler:
92-
if config.profiler == 'nsys':
93-
libcudart.cudaProfilerStop()
94-
else:
95-
jax.profiler.stop_trace()
86+
jax.profiler.stop_trace()
9687

9788

9889
def initialize_summary_writer(config):

0 commit comments

Comments
 (0)