Skip to content

feat: add CUDA-compatible hardware platforms - #45

Merged
Chamberlain0w0 merged 1 commit into
masterfrom
hardware/cuda-compatible-platforms
Aug 4, 2026
Merged

feat: add CUDA-compatible hardware platforms#45
Chamberlain0w0 merged 1 commit into
masterfrom
hardware/cuda-compatible-platforms

Conversation

@baominghelly

@baominghelly baominghelly commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add hardware benchmark support for NVIDIA CUDA, MetaX, Iluvatar, Hygon, and Moore Threads
  • centralize platform aliases and build/runtime configuration in the hardware constants module
  • keep hardware dispatch framework-based while resolving the target device inside the hardware adapter
  • add CUDA-compatible runtime wrappers, build support, hardware detection, documentation, and focused tests
  • preserve the MetaX auto-detection behavior introduced by PR feat: Add metax build for cuda script #40

Motivation

The hardware benchmark adapter previously assumed a CUDA-only environment. CUDA-compatible accelerator platforms need platform-specific compiler, runtime, visibility, and cache parsing behavior while preserving the existing benchmark interface and CUDA behavior.

User impact

Users can run the same public test case on all five supported platform families:

hardware.cudaUnified.Comprehensive

with config.device set to cuda, metax, iluvatar, hygon, or moore. Comprehensive mode runs four memory-bandwidth directions, four STREAM operations, and L1/L2 cache tests.

Rebase

Current head: 0633c640a5ac499137e0551b7df68fd43a41c6c1.

The branch is rebased directly onto master at d627465b7aa1c763ece071bda22f9b6f5e1b0cdb (PR #40). Conflicts in CMakeLists.txt, build.sh, and hardware_adapter.py were resolved by retaining the multi-platform implementation while preserving PR #40's runtime MetaX detection through the legacy _build_cuda_project() entrypoint.

Validation

Validation performed on the rebased commit:

  • focused unit tests: 31 passed
  • Black 23.9.1: unchanged
  • compileall, shell syntax checks, and git diff --check: passed
  • PR diff Han-character scan: no matches
  • CUDA 13 clean CMake configure and build: passed
  • MetaX C550 full Adapter --all: 10/10 metrics, Adapter exit 0, container exit 0

The earlier five-platform hardware run used 27f0e1389e85a726c447b1b064d070d89d2e1800 and passed on NVIDIA A100, MetaX C550, Iluvatar TG-V200, Hygon Z100L/DCU, and Moore MTT S5000. The rebased head preserves those benchmark implementations; MetaX was rerun on the exact current head because PR #40 overlapped the MetaX build path.

Moore required a test-environment workaround after its host driver was updated to 3.3.6: the container runtime injected libmusa.so.4.3.6 but left the image's libmusa.so chain pointing to a zero-byte libmusa.so.4.3.1 placeholder. A read-only bind mount to the host driver library allowed the unchanged PR code to complete all tests.

@baominghelly
baominghelly force-pushed the hardware/cuda-compatible-platforms branch from 27f0e13 to bfacba6 Compare August 3, 2026 03:07
@baominghelly
baominghelly marked this pull request as ready for review August 3, 2026 03:14
@baominghelly
baominghelly force-pushed the hardware/cuda-compatible-platforms branch from bfacba6 to 0633c64 Compare August 3, 2026 07:59
@Chamberlain0w0
Chamberlain0w0 merged commit 461e37f into master Aug 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants