Skip to content

Commit

Permalink
ci: Use single runner machines for unit tests (#11937)
Browse files Browse the repository at this point in the history
* use torchrun

Signed-off-by: oliver könig <[email protected]>

* f

Signed-off-by: oliver könig <[email protected]>

* fix

Signed-off-by: oliver könig <[email protected]>

* f

Signed-off-by: oliver könig <[email protected]>

* f

Signed-off-by: oliver könig <[email protected]>

* fix unit test

Signed-off-by: oliver könig <[email protected]>

* f

Signed-off-by: oliver könig <[email protected]>

---------

Signed-off-by: oliver könig <[email protected]>
  • Loading branch information
ko3n1g authored Jan 25, 2025
1 parent 7f2dd7b commit 6b5e2ae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/cicd-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_ASR') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
TIMEOUT: 20
# TODO: remove this hack
SCRIPT: |
Expand All @@ -114,7 +114,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_Audio') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
TIMEOUT: 20
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/audio -m "not pleasefixme" --with_downloads
Expand All @@ -124,7 +124,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_Common') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/common -m "not pleasefixme" --with_downloads
Expand All @@ -133,7 +133,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_LLM') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/llm -m "not pleasefixme" --with_downloads
Expand All @@ -142,7 +142,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_Multimodal') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/multimodal -m "not pleasefixme" --with_downloads
Expand All @@ -151,7 +151,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_NLP') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/nlp -m "not pleasefixme" --with_downloads
Expand All @@ -160,7 +160,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_TTS') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/collections/tts -m "not pleasefixme" --with_downloads
Expand All @@ -169,7 +169,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'OPTIONAL_L0_Unit_Tests_GPU_Core') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
TIMEOUT: 20
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/core -m "not pleasefixme" --with_downloads
Expand All @@ -180,7 +180,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_Hydra') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest tests/hydra -m "not pleasefixme" --with_downloads
Expand All @@ -198,7 +198,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_GPU_Others') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-gpus-1
SCRIPT: |
NEMO_NUMBA_MINVER=0.53 pytest -m "not pleasefixme" --with_downloads \
--ignore=tests/collections/asr \
Expand Down Expand Up @@ -267,7 +267,7 @@ jobs:
uses: ./.github/workflows/_test_template.yml
if: contains(fromJSON(needs.cicd-test-container-setup.outputs.test_to_run), 'L0_Unit_Tests_CPU_NLP') || needs.cicd-test-container-setup.outputs.all == 'true'
with:
RUNNER: self-hosted-azure
RUNNER: self-hosted-azure-cpu
TIMEOUT: 20
SCRIPT: |
CUDA_VISIBLE_DEVICES="" NEMO_NUMBA_MINVER=0.53 pytest tests/collections/nlp -m "not pleasefixme" --cpu --with_downloads --relax_numba_compat
Expand Down
6 changes: 5 additions & 1 deletion tests/collections/nlp/test_flash_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,12 @@
try:
import pynvml

pynvml.nvmlInit()
handle = pynvml.nvmlDeviceGetHandleByIndex(0)
device_arch = pynvml.nvmlDeviceGetArchitecture(handle)
pynvml.nvmlShutdown()
HAVE_PYNVML = True
except (ImportError, ModuleNotFoundError):
except (ImportError, ModuleNotFoundError, pynvml.nvml.NVMLError_LibraryNotFound):
HAVE_PYNVML = False


Expand Down

0 comments on commit 6b5e2ae

Please sign in to comment.