https://github.com/google/jax
Revision 2c92037150f0eaa767ab1f663296ee1c7338a48e authored by Eugene Burmako on 08 December 2022, 18:55:14 UTC, committed by jax authors on 08 December 2022, 18:55:49 UTC
When working with George on https://github.com/google/jax/pull/13427, I discovered that modules with verifier errors can happily cross API boundaries and create confusion downstream.

As discussed, this is unintentional - the expectation was that `ctx.module.operation.verify()` will throw an exception when verification fails. This CL addresses that and throws an exception accordingly.

Not sure how to test this, given that passing a module with verifier errors to module_to_string indicates a logic error (i.e. such module shouldn't have been produced by JAX in the first place). As a result, I didn't write any tests, but I'm happy to write them if there's a good way to do that.

PiperOrigin-RevId: 493940591
1 parent 02ba16e
History
Tip revision: 2c92037150f0eaa767ab1f663296ee1c7338a48e authored by Eugene Burmako on 08 December 2022, 18:55:14 UTC
Fail lower_jaxpr_to_module if the module fails verification
Tip revision: 2c92037
File Mode Size
.github
benchmarks
build
cloud_tpu_colabs
docs
examples
images
jax
jaxlib
tests
third_party
.bazelrc -rw-r--r-- 17.4 KB
.bazelversion -rw-r--r-- 6 bytes
.gitignore -rw-r--r-- 307 bytes
.pre-commit-config.yaml -rw-r--r-- 642 bytes
.readthedocs.yml -rw-r--r-- 569 bytes
AUTHORS -rw-r--r-- 313 bytes
CHANGELOG.md -rw-r--r-- 74.2 KB
CITATION.bib -rw-r--r-- 408 bytes
CONTRIBUTING.md -rw-r--r-- 150 bytes
LICENSE -rw-r--r-- 11.1 KB
README.md -rw-r--r-- 25.1 KB
WORKSPACE -rw-r--r-- 1.7 KB
conftest.py -rw-r--r-- 2.5 KB
mypy.ini -rw-r--r-- 646 bytes
pylintrc -rw-r--r-- 1.6 KB
pytest.ini -rw-r--r-- 1.6 KB
setup.cfg -rw-r--r-- 1.2 KB
setup.py -rw-r--r-- 4.2 KB

README.md

back to top