Revert "Fixups for NVIDIA fabric support" - #536
Closed
mawad-amd wants to merge 1 commit into
Closed
Conversation
This reverts commit 0c3be44.
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reverts the prior “Fixups for NVIDIA fabric support” changes, removing NVIDIA-specific fabric probing and driver/allocator support paths.
Changes:
- Removes NVIDIA fabric reachability probing used to infer fabric domains when NVML lacks UUIDs.
- Simplifies/reverts NVIDIA local driver and external tensor import behavior (drops pointer-handle export/address-range support and alias fallback).
- Removes several NVIDIA-related heuristics and torchrun-aware execution paths from benchmark/example utilities.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| iris/ops/all_gather_matmul_hbm_buffer.py | Reverts backend-conditional Triton launch kwargs to an unconditional setting. |
| iris/host/memory/allocators/vmem_chunked_allocator.py | Reverts external tensor import fallback logic and exception handling around NVIDIA limitations. |
| iris/host/distributed/topology.py | Removes NVIDIA fabric connectivity probe and related hashing logic. |
| iris/drivers/local/nvidia.py | Removes pointer-handle export/address-range APIs and context re-binding behavior. |
| iris/bench/_runner.py | Removes torchrun/srun environment detection to avoid nested launches. |
| examples/14_all_gather_gemm/example_run_pull.py | Simplifies distributed init/spawn logic; removes torchrun/env-driven path and topology printing. |
| benchmark/ops/all_gather_matmul/auto_config.py | Removes NVIDIA architecture support and heuristic fallback configs; updates detection docs. |
| launch_kwargs = {} | ||
| if getattr(torch.version, "hip", None): | ||
| launch_kwargs["matrix_instr_nonkdim"] = 16 | ||
| launch_kwargs = {"matrix_instr_nonkdim": 16} |
| return self._external_tensor_alias(external_tensor) | ||
| raise | ||
|
|
||
| alloc_base, alloc_size = self.driver.get_address_range(external_ptr) |
| return self._external_tensor_alias(external_tensor) | ||
| raise | ||
|
|
||
| handle_bytes = self.driver.export_pointer_handle(alloc_base, alloc_size) |
Comment on lines
614
to
617
| def free_va(self, va: int, size: int) -> None: | ||
| """Free a CUDA VA range previously returned by reserve_va.""" | ||
| self._check_initialized() | ||
| _cuda_try(_cuda_driver.cuMemAddressFree(va, size), "cuMemAddressFree") |
Comment on lines
558
to
559
| # Launch once per unique num_ranks, collecting results across runs | ||
| all_results: list[Result] = [] |
Comment on lines
+75
to
+79
| def example_run(rank: int, world_size: int, init_url: str, args: argparse.Namespace): | ||
| backend = "nccl" if torch.cuda.is_available() else "gloo" | ||
| if local_rank is None: | ||
| local_rank = rank | ||
| if torch.cuda.is_available(): | ||
| torch.cuda.set_device(local_rank) | ||
| init_kwargs = { | ||
| "backend": backend, | ||
| "init_method": init_url, | ||
| "world_size": world_size, | ||
| "rank": rank, | ||
| } | ||
| if backend == "nccl": | ||
| init_kwargs["device_id"] = torch.device(f"cuda:{local_rank}") | ||
| dist.init_process_group(**init_kwargs) | ||
|
|
||
| if args.print_topology: | ||
| from iris.host.distributed.topology import TopologyDiscovery | ||
|
|
||
| topology = TopologyDiscovery().discover() | ||
| if rank == 0: | ||
| print(topology.summary(), flush=True) | ||
| dist.init_process_group( | ||
| backend=backend, init_method=init_url, world_size=world_size, rank=rank, device_id=torch.device(f"cuda:{rank}") | ||
| ) |
| shmem = iris.iris() | ||
|
|
||
| torch.manual_seed(42) # Use a fixed seed for consistent random data | ||
| torch.cuda.set_device(rank) |
Comment on lines
97
to
101
| Detection order: | ||
| 1. IRIS_GPU_ARCH environment variable (override) | ||
| 2. PyTorch CUDA-without-HIP detection for NVIDIA | ||
| 3. rocminfo gfx target parsing for AMD | ||
| 2. rocm-smi --showproductname parsing | ||
| 3. rocminfo gfx target parsing | ||
| 4. Falls back to "mi300x" (most common deployment target) |
| pass | ||
|
|
||
| # 3. Try rocminfo for AMD gfx target | ||
| # 2. Try rocminfo for gfx target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Reverts #534