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

OptionOverride parser does not support the same syntax as XLA_FLAGS for enum values [jax.jit(..., compiler_options={...})] #22459

Open
olupton opened this issue Feb 7, 2025 · 0 comments

Comments

@olupton
Copy link
Contributor

olupton commented Feb 7, 2025

This means that, for example, setting

--xla_gpu_enable_command_buffer=+conditional

with XLA_FLAGS works, but passing it via

jax.jit(..., compiler_options={"xla_gpu_enable_command_buffer": "+conditional"})

does not work. It seems there are multiple reasons:

First, the + syntax is not understood.
Second, parsing from enum string names is case-sensitive in the second path.
Third, parsing from enum string names appears to be buggy as this branch does not return success:

if (enum_desc != nullptr) {
if (field->is_repeated()) {
reflection->AddEnum(&debug_options, field, enum_desc);
} else {
reflection->SetEnum(&debug_options, field, enum_desc);
}
}

(also, integer enum values are not validated)

It also does not seem to be possible to set multiple values via compiler_options, whereas XLA_FLAGS supports this using a comma-separated format.

These two paths should support the same syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant