Skip to content

Commit 5e0be4d

Browse files
Highwaycopybara-github
authored andcommitted
Added a global (to gemma) zones list to enable most call sites to PROFILER_ZONE3 to avoid the sychronization required for the static const initialization of the zone handle.
Improved flash_attention to enable profiling using the new zones. PiperOrigin-RevId: 817072887
1 parent f9a8562 commit 5e0be4d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hwy/profiler.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ class ZoneHandle {
113113

114114
bool operator==(const ZoneHandle other) const { return bits_ == other.bits_; }
115115
bool operator!=(const ZoneHandle other) const { return bits_ != other.bits_; }
116+
bool IsEmpty() const { return bits_ == 0; }
116117

117118
size_t ZoneIdx() const {
118119
HWY_DASSERT(bits_ != 0);

0 commit comments

Comments
 (0)