Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print payload #8312

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions torch_xla/experimental/custom_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ def trace_pallas(kernel: Callable,
return trace_pallas_arg_to_payload[hash_key], tensor_args

# Here we ignore the kwargs for execution as most of the time, the kwargs is only used in traced code.
os.environ['USE_SINGLE_SLICE'] = 'true'
ir = jax.jit(
kernel, static_argnums=static_argnums,
static_argnames=static_argnames).lower(*jax_args, **kwargs).compiler_ir()
payload = _extract_backend_config(ir)
os.environ.pop('USE_SINGLE_SLICE', None)

if use_cache:
# if we reach here it means we have a cache miss.
Expand Down
Loading