mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-08-10 12:22:28 +00:00
[bugs] fix args.profile=False DummyProfiler errro
This commit is contained in:
parent
ca674549e0
commit
fba04e857b
@ -36,6 +36,12 @@ def get_profile_context(enable_flag, warmup_steps, active_steps, save_dir):
|
||||
def step(self):
|
||||
self.step_number += 1
|
||||
|
||||
def __enter__(self):
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type, exc_value, traceback):
|
||||
pass
|
||||
|
||||
if enable_flag:
|
||||
return profile(
|
||||
activities=[ProfilerActivity.CPU, ProfilerActivity.CUDA],
|
||||
|
Loading…
Reference in New Issue
Block a user