Fix ASR tests
State: closed | Pull request: yes
Labels: name: ASR

name: CI

name: Run CICD

# What does this PR do ?

Fix ASR tests after upgrading to `nvidia/pytorch:24.07` container:
- merge RNN-T alignment tests with unit tests
- avoid files in RNN-T alignment tests that cause issues with the precision, which leads to different results for batched/non-batched decoding
- support non-CUDA inputs for CUDA graph decoder with frame-looping algorithm (fallback to default algorithm in this case)
- temporary fix for failing tests with broken `torch.load` (should be debugged and fixed in the follow-up PR)


**Collection**: [ASR]

# Changelog 
- Add specific line by line info of high level changes in this PR.

# Usage
* You can potentially add a usage example below

```python
# Add a code snippet demonstrating how to use this 
```

# GitHub Actions CI

The Jenkins CI system has been replaced by GitHub Actions self-hosted runners.

The GitHub Actions CI will run automatically when the "Run CICD" label is added to the PR.
To re-run CI remove and add the label again.
To run CI on an untrusted fork, a NeMo user with write access must first click "Approve and run".

# Before your PR is "Ready for review"
**Pre checks**:
- [x] Make sure you read and followed [Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md)
- [ ] Did you write any new necessary tests?
- [ ] Did you add or update any necessary documentation?
- [ ] Does the PR affect components that are optional to install? (Ex: Numba, Pynini, Apex etc)
  - [ ] Reviewer: Does the PR have correct import guards for all optional libraries?
  
**PR Type**:
- [ ] New Feature
- [x] Bugfix
- [ ] Documentation

If you haven't finished some of the above items you can still open "Draft" PR.


## Who can review?

Anyone in the community is free to review the PR once the checks have passed. 
[Contributor guidelines](https://github.com/NVIDIA/NeMo/blob/main/CONTRIBUTING.md) contains specific people who can review PRs to various areas.

# Additional Information
* Related to # (issue)


[🤖]: Hi @artbataev 👋,

We wanted to let you know that a [CICD pipeline](https://github.com/NVIDIA/NeMo/actions/runs/11371567918) for this PR just finished successfully

So it might be time to merge this PR or get some approvals

I'm just a bot so I'll leave it you what to do next.

//cc @pablo-garay @ko3n1g

> QQ: Why did you remove L2_Transducer_alignment_Running_pytest completely?

@ko3n1g Initially, this stage was separated because it was tied to the Jenkins machine.
I fixed this in the previous PR https://github.com/NVIDIA/NeMo/pull/9862, and now it is just a unit test. This saves computing time since checkpoints used in different tests are cached. 

The tests passed now. You can see in the log https://github.com/NVIDIA/NeMo/actions/runs/11371567918/job/31634824387?pr=10794

```
tests/collections/asr/decoding/test_rnnt_alignments.py::test_rnnt_alignments[True-True-cuda] PASSED [ 28%]
tests/collections/asr/decoding/test_rnnt_alignments.py::test_rnnt_alignments[True-False-cuda] SKIPPED [ 28%]
tests/collections/asr/decoding/test_rnnt_alignments.py::test_rnnt_alignments[False-True-cuda] PASSED [ 28%]
tests/collections/asr/decoding/test_rnnt_alignments.py::test_rnnt_alignments[False-False-cuda] PASSED [ 28%]
```