openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.64k stars 418 forks source link

XLA:FFI: Improve error message when the wrong number of attributes are passed. #17941

Closed copybara-service[bot] closed 1 week ago

copybara-service[bot] commented 1 week ago

XLA:FFI: Improve error message when the wrong number of attributes are passed.

It probably improves the user experience if we report the names of the attributes that were passed when this check fails (see https://github.com/jax-ml/jax/issues/24131, for example). It might also be worth listing the names of the expected parameters, but I didn't include that here yet.