The GitHub Actions job "CI" on tvm-ffi.git/ascend-addon has failed.
Run started by GitHub user voidLitchi (triggered by tqchen).

Head commit for run:
1403e7faf8412d48ab6c0701b213a132cbef1bc1 / Yuzhi Zhang 
<[email protected]>
[FEAT] Add torch_npu stream support to the Torch C-DLPack addon

## Motivation

PyTorch exposes Ascend tensors through torch_npu's PrivateUse1 backend and 
exports them as kDLExtDev through DLPack. The existing Torch C-DLPack addon can 
convert these tensors, but its current_work_stream callback only handles CUDA 
and ROCm. TVM-FFI therefore receives a null stream for torch_npu and may launch 
a kernel on the default NPU stream instead of the caller's current torch.npu 
stream.

## Changes

- Detect torch_npu after CUDA and ROCm on Linux, and use a torch_npu-specific 
addon even when PyTorch already exposes a DLPack C exchange API.
- Preserve the upstream PyTorch API preference for CUDA and ROCm.
- Add a mutually exclusive --build-with-torch-npu option and reject it on 
Windows and macOS.
- Discover torch_npu headers and libraries from the installed package, define 
BUILD_WITH_TORCH_NPU, and link libtorch_npu.
- Return c10_npu::getCurrentNPUStream(device_id).stream() for kDLExtDev from 
the addon's current_work_stream callback.
- Reuse the upstream ABI-aware addon cache key and Torch-version-based C++ 
standard selection.

## Testing

- Add unit coverage for backend selection, platform fallback, existing API 
preference, and mutually exclusive build options.
- Add a torch_npu runtime test that compares current_work_stream against a 
non-default torch.npu stream.
- Verify the modified files with the CI-pinned Ruff and ty versions, ASF header 
and file-type checks, version consistency, Python compilation, and standalone 
selection and argument-parsing checks on Windows. The torch_npu runtime test 
requires a Linux host with torch_npu and Ascend hardware.

Report URL: https://github.com/apache/tvm-ffi/actions/runs/30436898615

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to