Skip to content

test: preserve default ROCm backend behavior#488

Merged
coderfeli merged 1 commit intoROCm:mainfrom
Deep-Spark:fujun.han/guardrail-default-backend-behavior
May 9, 2026
Merged

test: preserve default ROCm backend behavior#488
coderfeli merged 1 commit intoROCm:mainfrom
Deep-Spark:fujun.han/guardrail-default-backend-behavior

Conversation

@Peter9606
Copy link
Copy Markdown
Contributor

@Peter9606 Peter9606 commented May 9, 2026

Summary

This PR adds guardrail tests for FlyDSL’s multi-backend defaults.

The tests ensure that:

  • Python compile backend defaults still resolve to rocm
  • Python device runtime defaults still resolve to rocm
  • registering an additional Python backend does not change the default backend selection
  • CMake defaults still select only the rocdl backend
  • ROCm runtime wrappers are only included when rocdl is selected
  • future CMake backend descriptors are included only when explicitly selected

Motivation

FlyDSL now has infrastructure for multiple hardware backends. As new backend stacks are added, community users who do not opt into those backends should see no behavior change: default imports, backend selection, runtime pairing, tests, and builds should continue to use the existing ROCm/ROCDL path.

This PR makes that invariant explicit without adding any vendor-specific backend. The CMake test uses a temporary dummy backend descriptor to verify that future backend descriptors remain opt-in.

Test plan

PYTHONPATH="$PWD/python:$PWD" python3 -m pytest \
  tests/unit/test_device_runtime.py \
  tests/unit/test_compile_backends.py \
  tests/unit/test_backend_cmake_defaults.py \
  -v --confcutdir=tests/unit

Result: 15 passed.

@Peter9606 Peter9606 force-pushed the fujun.han/guardrail-default-backend-behavior branch 3 times, most recently from 6e580c2 to dafdfc8 Compare May 9, 2026 01:21
Co-authored-by: Cursor <cursoragent@cursor.com>
@Peter9606 Peter9606 force-pushed the fujun.han/guardrail-default-backend-behavior branch from dafdfc8 to f0869a2 Compare May 9, 2026 03:45
@coderfeli coderfeli merged commit 1b2a751 into ROCm:main May 9, 2026
7 checks passed
@coderfeli
Copy link
Copy Markdown
Collaborator

LGTM. Merged @Peter9606

@Peter9606 Peter9606 deleted the fujun.han/guardrail-default-backend-behavior branch May 9, 2026 06:40
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