Skip to content

refactor(infra)!: pass backend configuration through Target - #20651

Merged
tqchen merged 1 commit into
apache:mainfrom
spectrometerHBH:refactor-target-backend-config
Oct 11, 2026
Merged

tqchen merged 1 commit into
apache:mainfrom
spectrometerHBH:refactor-target-backend-config

Conversation

@spectrometerHBH

@spectrometerHBH spectrometerHBH commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

CUDA backend configuration already travels through Target attributes. Remove the parallel backend_config keyword from tvm.compile, tvm.tirx.build, tvm.relax.build, and IketProfiler.compile; compilation now resolves its defaults from the supplied Target.

import tvm
from tvm.backend.cuda import BackendConfig

target = tvm.target.Target({
    "kind": "cuda",
    "arch": "sm_100a",
    "backend_config": {
        "cuda": BackendConfig(compiler="nvrtc", nvrtc=["--use_fast_math", "--ftz=false"])
    },
})
executable = tvm.compile(func, target=target)

Each device_entry(backend_config=...) keeps its independent overrides, including architecture and toolchain settings. The existing per-entry resolution and module grouping continue to apply. Update callers, source helpers, and documentation to use Target defaults followed by entry overrides.

Follow-up to merged #20645.

Validation:

  • Built successfully on the merged refactor(infra)!: unify CUDA backend configuration #20645 baseline (0f861ee568) in 67 seconds.
  • Full TIRx suite: 2,689 passed / 290 skipped on seven B200 GPUs, 165 seconds.
  • Backend configuration, launch, and IKET regressions: 131 passed / 2 skipped.
  • CUDA codegen and Relax VM build regressions: 415 passed / 4 skipped.
  • Updated TIRx-kernels callers: 94 focused tests passed; all eight MQA registry correctness cases passed. Both workload and strict registry import gates passed (274 workloads / 93 kernels).
  • Changed-file and staged pre-commit checks passed.

The latest upstream commit (27576ce2d1) fails the local NCCL-enabled C++ build in cuda_ipc_memory.cc after its object-handle changes. The checks above therefore use the merged #20645 baseline; this follow-up changes Python APIs, tests, and documentation only.

@tqchen
tqchen merged commit 3a0b83a into apache:main Oct 11, 2026
8 checks passed
tqchen pushed a commit that referenced this pull request Oct 16, 2026
CUDA backend configuration already travels through Target attributes.
Remove the parallel `backend_config` keyword from `tvm.compile`,
`tvm.tirx.build`, `tvm.relax.build`, and `IketProfiler.compile`;
compilation now resolves its defaults from the supplied Target.

```python
import tvm
from tvm.backend.cuda import BackendConfig

target = tvm.target.Target({
    "kind": "cuda",
    "arch": "sm_100a",
    "backend_config": {
        "cuda": BackendConfig(compiler="nvrtc", nvrtc=["--use_fast_math", "--ftz=false"])
    },
})
executable = tvm.compile(func, target=target)
```

Each `device_entry(backend_config=...)` keeps its independent overrides,
including architecture and toolchain settings. The existing per-entry
resolution and module grouping continue to apply. Update callers, source
helpers, and documentation to use Target defaults followed by entry
overrides.

Follow-up to merged #20645.

Validation:

- Built successfully on the merged #20645 baseline (`0f861ee568`) in 67
seconds.
- Full TIRx suite: 2,689 passed / 290 skipped on seven B200 GPUs, 165
seconds.
- Backend configuration, launch, and IKET regressions: 131 passed / 2
skipped.
- CUDA codegen and Relax VM build regressions: 415 passed / 4 skipped.
- Updated TIRx-kernels callers: 94 focused tests passed; all eight MQA
registry correctness cases passed. Both workload and strict registry
import gates passed (274 workloads / 93 kernels).
- Changed-file and staged pre-commit checks passed.

The latest upstream commit (`27576ce2d1`) fails the local NCCL-enabled
C++ build in `cuda_ipc_memory.cc` after its object-handle changes. The
checks above therefore use the merged #20645 baseline; this follow-up
changes Python APIs, tests, and documentation only.
tqchen pushed a commit that referenced this pull request Oct 18, 2026
CUDA backend configuration already travels through Target attributes.
Remove the parallel `backend_config` keyword from `tvm.compile`,
`tvm.tirx.build`, `tvm.relax.build`, and `IketProfiler.compile`;
compilation now resolves its defaults from the supplied Target.

```python
import tvm
from tvm.backend.cuda import BackendConfig

target = tvm.target.Target({
    "kind": "cuda",
    "arch": "sm_100a",
    "backend_config": {
        "cuda": BackendConfig(compiler="nvrtc", nvrtc=["--use_fast_math", "--ftz=false"])
    },
})
executable = tvm.compile(func, target=target)
```

Each `device_entry(backend_config=...)` keeps its independent overrides,
including architecture and toolchain settings. The existing per-entry
resolution and module grouping continue to apply. Update callers, source
helpers, and documentation to use Target defaults followed by entry
overrides.

Follow-up to merged #20645.

Validation:

- Built successfully on the merged #20645 baseline (`0f861ee568`) in 67
seconds.
- Full TIRx suite: 2,689 passed / 290 skipped on seven B200 GPUs, 165
seconds.
- Backend configuration, launch, and IKET regressions: 131 passed / 2
skipped.
- CUDA codegen and Relax VM build regressions: 415 passed / 4 skipped.
- Updated TIRx-kernels callers: 94 focused tests passed; all eight MQA
registry correctness cases passed. Both workload and strict registry
import gates passed (274 workloads / 93 kernels).
- Changed-file and staged pre-commit checks passed.

The latest upstream commit (`27576ce2d1`) fails the local NCCL-enabled
C++ build in `cuda_ipc_memory.cc` after its object-handle changes. The
checks above therefore use the merged #20645 baseline; this follow-up
changes Python APIs, tests, and documentation only.
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