[JAX API] Updating TransferToMemoryKind and jax.experimental.pallas.triton
#1339
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@matthew-e-hopkins
Hey people, this is a huge update, to allow us to use JAX > 0.5.3 (we're currently testing AXLearn with JAX 0.7.2).
I've implemented the following changes:
_JAX_MEMORY_SPACE_SUPPORTso that all these changes can work with different versions of JAXutils.pyJAX'from jax._src.sharding_impls import TransferToMemoryKindhas been substituted with its correspondent version for JAX 0.7 (jax.memory.Space.*). I am preserving the previous option by checking the jax version:optimizers_test.pyandoptimizers.pyjax.experimental.pallas.triton.TritonCompilerParamshas now changed in.CompilerParams, sogpu_attention.py,gpu_decoding.py,gpu_paged_attention.pyandpaged_kv_cache_gpu_kernel.pyhave been changed accordingly. Again, as before, I'm importing_JAX_MEMORY_SPACE_SUPPORTto check the JAX version and preserving the previous code.I've tested the changes with Fuji models, it would be great to find an optimal solution for this, as we'd like to support AXLearn in JAX-Toolbox again newer JAX versions.
Please, let me know if you want some changes. Thank you