Skip to content

Commit fd28b2f

Browse files
frgossenGoogle-ML-Automation
authored andcommitted
Fix JAX PGLE test
XLA dumps one more HLO file by default, which leads to one more PGLE profile file. PiperOrigin-RevId: 764274080
1 parent 0d0393f commit fd28b2f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/pgle_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ def f(x):
167167
self.assertArraysEqual(f(x), expected)
168168
self.assertEqual(cache_miss_count(), 2)
169169
fdo_profiles_before_pgle = self.get_fdo_profiles(dump_dir)
170-
# One for before and one for after optimization.
171-
self.assertLen(fdo_profiles_before_pgle, 2)
170+
# One for before optimizatiom, one after SPMD partitioning, and one
171+
# after optimization.
172+
self.assertLen(fdo_profiles_before_pgle, 3)
172173
# The FDO profile file should be empty.
173174
self.assertEqual(
174175
os.path.getsize(os.path.join(dump_dir, fdo_profiles_before_pgle[0])), 0)
@@ -178,8 +179,9 @@ def f(x):
178179
self.assertArraysEqual(f(x), expected)
179180
self.assertEqual(cache_miss_count(), 2)
180181
fdo_profiles_after_pgle = self.get_fdo_profiles(dump_dir)
181-
# One for before and one for after optimization.
182-
self.assertLen(fdo_profiles_after_pgle, 4)
182+
# One more before optimizatiom, one more after SPMD partitioning, and
183+
# one more after optimization.
184+
self.assertLen(fdo_profiles_after_pgle, 6)
183185

184186
for fdo_profile in fdo_profiles_after_pgle:
185187
if fdo_profile not in fdo_profiles_before_pgle:

0 commit comments

Comments
 (0)