File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626import os
2727from pathlib import Path
2828import subprocess
29- from ctypes import cdll
3029import numpy as np
3130
3231import flax
6362
6463from google .cloud import storage
6564
66- libcudart = cdll .LoadLibrary ("libcudart.so" )
67-
6865FrozenDict = core .frozen_dict .FrozenDict
6966
7067
@@ -81,18 +78,12 @@ def l2norm_pytree(x):
8178
8279def 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
9084def 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
9889def initialize_summary_writer (config ):
You can’t perform that action at this time.
0 commit comments