Skip to content

Commit

Permalink
Merge pull request #22269 from superbobry:main
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 649395181
  • Loading branch information
jax authors committed Jul 4, 2024
2 parents 6c00cd1 + ffa39c0 commit 061ccd4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jax/_src/pjit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ def unpack(key):

# have we seen this function before at all?
fun_name = getattr(f, '__qualname__', f)
if debug_info.func_src_info:
if debug_info is not None and debug_info.func_src_info:
_, _, *rest = debug_info.func_src_info.split(' ')
src_info = " defined at " + ' '.join(rest)
else:
Expand Down
5 changes: 5 additions & 0 deletions tests/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4618,6 +4618,11 @@ def f(key):
for msg in cm.output:
self.assertIn("TRACING CACHE MISS", msg)

def test_cache_miss_explanations_no_debug_info(self):
# ``operator.add`` is a built-in function and does not have debug info.
with config.explain_cache_misses(True):
jax.jit(operator.add)(42, 24)

@parameterized.named_parameters([
{"testcase_name": f"{dtype}", "dtype": dtype}
for dtype in jtu.dtypes.custom_floats])
Expand Down

0 comments on commit 061ccd4

Please sign in to comment.