diff --git a/.github/workflows/merlin.yml b/.github/workflows/merlin.yml index d40a20491..7d8f7e29a 100644 --- a/.github/workflows/merlin.yml +++ b/.github/workflows/merlin.yml @@ -32,4 +32,10 @@ jobs: name: "NVTabular (CPU)" uses: ./.github/workflows/tox.yml with: - env: test-nvtabular-cpu + env: test-nvtabular + + nvtabular-gpu: + name: "NVTabular (GPU)" + uses: ./.github/workflows/tox-gpu.yml + with: + env: test-nvtabular diff --git a/.github/workflows/tox-gpu.yml b/.github/workflows/tox-gpu.yml new file mode 100644 index 000000000..a94ac42e2 --- /dev/null +++ b/.github/workflows/tox-gpu.yml @@ -0,0 +1,26 @@ +name: "Reusable Workflow - Run Tox Env (1GPU)" + +on: + workflow_call: + inputs: + env: + description: "The name of the tox environment to run" + required: true + type: string + +jobs: + check: + runs-on: 1GPU + + steps: + - uses: actions/checkout@v3 + - name: Run tests + run: | + ref_type=${{ github.ref_type }} + branch=main + if [[ $ref_type == "tag"* ]] + then + raw=$(git branch -r --contains ${{ github.ref_name }}) + branch=${raw/origin\/} + fi + GIT_COMMIT=`git rev-parse HEAD` tox -e ${{ inputs.env }} -- $branch diff --git a/tox.ini b/tox.ini index 79f0e2f81..a2ac68960 100644 --- a/tox.ini +++ b/tox.ini @@ -52,8 +52,13 @@ commands = python -m pytest --cov-report term --cov merlin -rxs tests/unit -[testenv:test-nvtabular-cpu] -passenv=GIT_COMMIT +[testenv:test-nvtabular] +setenv = + TF_GPU_ALLOCATOR=cuda_malloc_async +passenv = + GIT_COMMIT + OPAL_PREFIX + CUDA_VISIBLE_DEVICES sitepackages=true allowlist_externals = git deps =