-
Notifications
You must be signed in to change notification settings - Fork 424
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] Fix kernel cache for loaded executables. #15998
Conversation
This makes the XLA kernel cache compatible with JAX module cache.
In the commit message, could you elaborate on what is the user-observable delta? (e.g. a sequence of steps X used to result in an undesirable state Y and now results in Z). You have that in tests, but it's a bit hard to connect this to what is user-observable (do we need a JAX test?) |
The failing JAX test was |
#include "xla/service/gpu/runtime/conditional_thunk.h" | ||
#include "xla/service/gpu/runtime/sequential_thunk.h" | ||
#include "xla/service/gpu/runtime/thunk.h" | ||
#include "xla/service/gpu/runtime/while_thunk.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should those cleanups be in this commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tempting to include such trivial small cleanups while changing the files for other reasons (also because for us, external developers, submitting changes is a slower process). I'll try to separate them in the future.
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663305969
Imported from GitHub PR #15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbca by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=#15998 from openxla:fix_kernel_cache b51fbca PiperOrigin-RevId: 663326327
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663326327
Imported from GitHub PR #15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbca by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=#15998 from openxla:fix_kernel_cache b51fbca PiperOrigin-RevId: 663326327
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663326327
Imported from GitHub PR #15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbca by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=#15998 from openxla:fix_kernel_cache b51fbca PiperOrigin-RevId: 663326327
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663326327
Imported from GitHub PR #15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbca by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=#15998 from openxla:fix_kernel_cache b51fbca PiperOrigin-RevId: 663326327
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663326327
…e only adds trivial dims. Reverts f8a3e0d FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663863020
…compilation Reverts f8a3e0d FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663525516
Reverts f8a3e0d FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663789692
Imported from GitHub PR openxla/xla#15998 LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution. This makes the XLA kernel cache compatible with the JAX module cache (example test: `bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu`). Copybara import of the project: -- b51fbcac5c7f172d06eb9de79770564f2e2c1250 by Ilia Sergachev <isergachev@nvidia.com>: [GPU] Fix kernel cache for loaded executables. This makes the XLA kernel cache compatible with JAX module cache. Merging this change closes #15998 PiperOrigin-RevId: 663854304
Reverts f8a3e0d FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#15998 from openxla:fix_kernel_cache b51fbcac5c7f172d06eb9de79770564f2e2c1250 PiperOrigin-RevId: 663872672
LoadCache() has to be called also in GpuThunkAotCompilationResult::LoadExecutable() to properly initialize the state of the name uniquer in the IR emitter context on this path to execution.
This makes the XLA kernel cache compatible with the JAX module cache (example test:
bazel test --test_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism --xla_gpu_kernel_cache_file=/dev/shm/xla.kernel.cache" tests/compilation_cache_test_gpu
).