Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion transformer_engine/jax/cpp_extensions/ep.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def wrapper(*args, **kwargs):
# a nullary thunk that closes over them; the array operands are captured
# as consts and lifted to real operands, outputs stay on device. XLA
# async-wraps the resulting call onto the collective stream.
annotated = compute_on(
annotated = compute_on( # pylint: disable=not-callable
compute_type="gpu_stream:collective",
out_memory_spaces=jax.memory.Space.Device,
)(lambda: func(*args, **kwargs))
Expand Down
9 changes: 8 additions & 1 deletion transformer_engine/jax/version_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,16 @@ def is_triton_autotuned_alias_safe() -> bool:
_COLLECTIVE_STREAM_MIN_JAX_VERSION = "0.10.1"


@lru_cache(maxsize=None)
def is_collective_stream_supported() -> bool:
"""Return True if the installed JAX supports the gpu_stream:collective annotation."""
return jax_version_meet_requirement(_COLLECTIVE_STREAM_MIN_JAX_VERSION)
if not jax_version_meet_requirement(_COLLECTIVE_STREAM_MIN_JAX_VERSION):
return False
try:
from jax.experimental.compute_on import compute_on # pylint: disable=unused-import
except ImportError:
return False
return True


def is_triton_extension_supported() -> bool:
Expand Down
Loading