Skip to content
Open
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
12 changes: 12 additions & 0 deletions transformer_engine/plugin/core/backends/vendor/cuda/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -1992,6 +1992,7 @@ def create_comm_overlap_p2p(
aggregate: bool = False,
) -> "CommOverlapP2P":
tex = self._get_tex()
comm_type = tex.CommOverlapType(int(comm_type)) if comm_type is not None else None
return tex.CommOverlapP2P(
buffer_shape,
buffer_dtype,
Expand All @@ -2008,3 +2009,14 @@ def create_comm_overlap_p2p(
use_ce,
aggregate,
)

def device_supports_multicast(self, device_id=-1):
return self._get_tex().device_supports_multicast(device_id)

def ubuf_built_with_mpi(self):
tex = self._get_tex()
return tex.ubuf_built_with_mpi()

def get_stream_priority_range(self, device_id=-1):
tex = self._get_tex()
return tex.get_stream_priority_range(device_id)
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,31 @@ def register_builtins(registry) -> None:
vendor="CUDA",
priority=100,
),
OpImpl(
op_name="device_supports_multicast",
impl_id="vendor.cuda",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.device_supports_multicast, is_avail),
vendor="CUDA",
priority=100,
),

OpImpl(
op_name="ubuf_built_with_mpi",
impl_id="vendor.cuda",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.ubuf_built_with_mpi, is_avail),
vendor="CUDA",
priority=100,
),
OpImpl(
op_name="get_stream_priority_range",
impl_id="vendor.cuda",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.get_stream_priority_range, is_avail),
vendor="CUDA",
priority=100,
),
# FlashAttention class getter
OpImpl(
op_name="get_flash_attention_class",
Expand Down
12 changes: 12 additions & 0 deletions transformer_engine/plugin/core/backends/vendor/hygon/hygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,7 @@ def create_comm_overlap_p2p(
aggregate: bool = False,
) -> "CommOverlapP2P":
tex = self._get_tex()
comm_type = tex.CommOverlapType(int(comm_type)) if comm_type is not None else None
return tex.CommOverlapP2P(
buffer_shape,
buffer_dtype,
Expand All @@ -1970,3 +1971,14 @@ def create_comm_overlap_p2p(
use_ce,
aggregate,
)

def device_supports_multicast(self, device_id=-1):
return self._get_tex().device_supports_multicast(device_id)

def ubuf_built_with_mpi(self):
tex = self._get_tex()
return tex.ubuf_built_with_mpi()

def get_stream_priority_range(self, device_id=-1):
tex = self._get_tex()
return tex.get_stream_priority_range(device_id)
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,30 @@ def register_builtins(registry) -> None:
vendor="HYGON",
priority=100,
),
OpImpl(
op_name="device_supports_multicast",
impl_id="vendor.hygon",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.device_supports_multicast, is_avail),
vendor="HYGON",
priority=100,
),
OpImpl(
op_name="ubuf_built_with_mpi",
impl_id="vendor.hygon",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.ubuf_built_with_mpi, is_avail),
vendor="HYGON",
priority=100,
),
OpImpl(
op_name="get_stream_priority_range",
impl_id="vendor.hygon",
kind=BackendImplKind.VENDOR,
fn=_bind_is_available(backend.get_stream_priority_range, is_avail),
vendor="HYGON",
priority=100,
),
# FlashAttention class getter
OpImpl(
op_name="get_flash_attention_class",
Expand Down
Loading