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

[GPU] Expose caching DebugOptions to python #15636

Closed
wants to merge 3 commits into from

Conversation

trevor-m
Copy link
Contributor

@trevor-m trevor-m commented Aug 1, 2024

Adds python bindings for xla_gpu_kernel_cache_file, xla_gpu_enable_llvm_module_compilation_parallelism and xla_gpu_per_fusion_autotune_cache_dir.

We would like to add some convenience features to JAX which will enable all caches with one flag/option (will open PR for that soon). This change is necessary for that.

@trevor-m trevor-m force-pushed the cache-python branch 2 times, most recently from a75829b to 207bcc6 Compare August 1, 2024 20:15
@NaiyerRizz NaiyerRizz self-assigned this Aug 2, 2024
Copy link
Member

@cheshire cheshire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to test those?

@cheshire
Copy link
Member

cheshire commented Aug 2, 2024

@skye @hawkinsp for PjRT API changes

@trevor-m
Copy link
Contributor Author

trevor-m commented Aug 5, 2024

Is it possible to test those?

Thanks for reviewing, added test to xla_client_test.

Copy link
Contributor

@skye skye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, please address the test comment though

@@ -3137,6 +3137,9 @@ def testCompileOptionsSerialization(self):
executable_build_options.num_partitions = 2
executable_build_options.debug_options.xla_cpu_enable_fast_math = True
executable_build_options.debug_options.xla_test_all_input_layouts = True
executable_build_options.debug_options.xla_gpu_kernel_cache_file = "/foo/bar"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you actually need to test these flags by adding them to L3157

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! Fixed this.

Copy link
Contributor

@skye skye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet thanks!

Uh @cheshire should you get this in or should I? Not sure how to do xla PRs but I can try...

@nouiz
Copy link
Contributor

nouiz commented Aug 19, 2024

What can we do to get this PR merged?
@cheshire @skye

copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Aug 20, 2024
Imported from GitHub PR openxla/xla#15636

Adds python bindings for `xla_gpu_kernel_cache_file`, `xla_gpu_enable_llvm_module_compilation_parallelism` and `xla_gpu_per_fusion_autotune_cache_dir`.

We would like to add some convenience  features to JAX which will enable all caches with one flag/option (will open PR for that soon). This change is necessary for that.
Copybara import of the project:

--
87dbb3d3abe5969d1509d965071c5c7dbdcb46d0 by Trevor Morris <tmorris@nvidia.com>:

Expose caching DebugOptions to python

--
3bb41fca800bc12d00870e7b8cbde3641de9beab by Trevor Morris <tmorris@nvidia.com>:

Add test

--
f0e04233522d8740c83b9b19138b76304b242604 by Trevor Morris <tmorris@nvidia.com>:

Fix tests

Merging this change closes #15636

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15636 from trevor-m:cache-python f0e04233522d8740c83b9b19138b76304b242604
PiperOrigin-RevId: 665300777
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Aug 20, 2024
Imported from GitHub PR openxla/xla#15636

Adds python bindings for `xla_gpu_kernel_cache_file`, `xla_gpu_enable_llvm_module_compilation_parallelism` and `xla_gpu_per_fusion_autotune_cache_dir`.

We would like to add some convenience  features to JAX which will enable all caches with one flag/option (will open PR for that soon). This change is necessary for that.
Copybara import of the project:

--
87dbb3d3abe5969d1509d965071c5c7dbdcb46d0 by Trevor Morris <tmorris@nvidia.com>:

Expose caching DebugOptions to python

--
3bb41fca800bc12d00870e7b8cbde3641de9beab by Trevor Morris <tmorris@nvidia.com>:

Add test

--
f0e04233522d8740c83b9b19138b76304b242604 by Trevor Morris <tmorris@nvidia.com>:

Fix tests

Merging this change closes #15636

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15636 from trevor-m:cache-python f0e04233522d8740c83b9b19138b76304b242604
PiperOrigin-RevId: 665300777
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Aug 20, 2024
Imported from GitHub PR openxla/xla#15636

Adds python bindings for `xla_gpu_kernel_cache_file`, `xla_gpu_enable_llvm_module_compilation_parallelism` and `xla_gpu_per_fusion_autotune_cache_dir`.

We would like to add some convenience  features to JAX which will enable all caches with one flag/option (will open PR for that soon). This change is necessary for that.
Copybara import of the project:

--
87dbb3d3abe5969d1509d965071c5c7dbdcb46d0 by Trevor Morris <tmorris@nvidia.com>:

Expose caching DebugOptions to python

--
3bb41fca800bc12d00870e7b8cbde3641de9beab by Trevor Morris <tmorris@nvidia.com>:

Add test

--
f0e04233522d8740c83b9b19138b76304b242604 by Trevor Morris <tmorris@nvidia.com>:

Fix tests

Merging this change closes #15636

PiperOrigin-RevId: 665475870
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

Successfully merging this pull request may close these issues.

5 participants