mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-13 00:15:35 +08:00
fix GPU profiling
This commit is contained in:
1
ane/2_compile/.gitignore
vendored
1
ane/2_compile/.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
*.hwx
|
||||
anecompiler.swap.*
|
||||
context_switch_log.txt
|
||||
|
||||
@@ -23,6 +23,8 @@ class ProfileOp:
|
||||
if DEBUG: self.st = time.time()
|
||||
def __exit__(self, *junk):
|
||||
if DEBUG:
|
||||
if cl_queue is not None:
|
||||
cl_queue.finish()
|
||||
et = (time.time()-self.st)*1000.
|
||||
debug_counts[self.name] += 1
|
||||
debug_times[self.name] += et
|
||||
|
||||
Reference in New Issue
Block a user