The GitHub Actions job "PR" on tvm.git/fix-nnapi-exported-cuda-tests has 
succeeded.
Run started by GitHub user tlopex (triggered by tlopex).

Head commit for run:
2a1c8238a7b52d47b31b7698fb87afe973d2f81c / tlopex <[email protected]>
[Relax][PyTorch][DLight] Fix exported-program CUDA test failures

Fixes the failures in 
tests/python/nightly/test_nnapi/test_from_exported_to_cuda.py
(PyTorch export -> Relax -> CUDA), which despite the directory name are plain
CUDA exported-program tests.

1. test_index_tensor: aten.index.Tensor with multiple index tensors and no
   None entries was lowered through a sequential-take fast path, which
   computes an outer product over the index tensors. PyTorch/NumPy advanced
   indexing broadcasts the index tensors together and applies them jointly,
   so e.g. x[[0, 1], [0, 1]] on a (5, 5, 5, 5) tensor produced shape
   (2, 2, 5, 5) instead of (2, 5, 5). Route the no-None case directly to
   relax.op.index_tensor (topi.adv_index), which implements the correct
   broadcast-and-zip semantics. The sequential-take path is kept for the
   sliced (None-containing) decomposed-interpolate pattern, whose orthogonal
   index shapes make the outer product equivalent.

2. test_copy_ (and any in-place op on a buffer/user input): functionalization
   in torch.export prepends mutation outputs (BUFFER_MUTATION /
   USER_INPUT_MUTATION) to the graph outputs, and the importer returned them
   as part of the Relax function's output tuple. Callers indexing outputs
   positionally then read the mutated-buffer value instead of the model
   output. Filter the outputs through the graph signature's output_specs and
   keep only user-facing outputs (USER_OUTPUT / LOSS_OUTPUT). Frontend test
   expectations that asserted the extra mutation outputs are updated.

3. test_cross_entropy_module:
   - aten.sum over a bool tensor was emitted as relax.op.sum on the bool
     input, which keeps dtype bool, so the non-ignored-target count in the
     decomposed cross-entropy collapsed to 1.0 and the mean reduction
     degenerated to a sum. Match PyTorch type promotion by casting bool and
     sub-64-bit integer inputs to int64 (or the explicit dtype argument)
     before summing.
   - The dlight GPU Fallback rule skipped blocks with zero loops entirely,
     so rank-0 kernels (the scalar divide) were marked tirx.is_scheduled
     without any thread binding and failed VerifyMemory. Bind such blocks
     through the existing add-unit-loop path, and only skip zero-loop blocks
     that already launch threads internally (e.g. opaque sort kernels),
     detected via thread_extent attrs / thread-bound loops in the block body.

The remaining wheel-only failure class ("Cannot find the source directory
given ffi_dir") is already fixed at HEAD by the libinfo rework: the new
tvm.libinfo.find_include_path resolves the wheel layout's
site-packages/tvm/include; the 0.25.0rc0 wheel predates that change.

All 52 tests in test_from_exported_to_cuda.py pass on CUDA, and
test_frontend_from_exported_program.py / test_frontend_from_fx.py /
tests/python/s_tir/dlight pass (test_one_hot is a pre-existing failure).

Report URL: https://github.com/apache/tvm/actions/runs/27330769922

With regards,
GitHub Actions via GitBox


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

Reply via email to