|
22 | 22 | name: Build Linux CUDA Plugin EP x64 Release |
23 | 23 | uses: ./.github/workflows/reusable_linux_build.yml |
24 | 24 | with: |
25 | | - pool_name: "onnxruntime-github-Ubuntu2204-AMD-CPU" |
| 25 | + pool_name: "onnxruntime-github-Ubuntu2204-AMD-CPU" # Build pool |
26 | 26 | build_config: Release |
27 | 27 | architecture: x64 |
28 | 28 | dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cuda |
|
39 | 39 | --cudnn_home=/usr/local/cuda-13.0 |
40 | 40 | --enable_cuda_profiling |
41 | 41 | --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=86 |
| 42 | + --cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=ON |
42 | 43 | --cmake_extra_defines onnxruntime_QUICK_BUILD=ON |
43 | 44 | --cmake_extra_defines onnxruntime_BUILD_CUDA_EP_AS_PLUGIN=ON |
44 | 45 | python_path_prefix: 'PATH=/opt/python/cp312-cp312/bin:$PATH' |
|
55 | 56 | runs-on: |
56 | 57 | - self-hosted |
57 | 58 | - "1ES.Pool=onnxruntime-github-linux-a10" |
| 59 | + - "1ES.ImageOverride=onnxruntime-ubuntu2204-CUDA-A10-Test" |
58 | 60 | - "JobId=test-linux-cuda-plugin-x64-release-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" |
59 | 61 | permissions: |
60 | 62 | contents: read |
@@ -109,63 +111,38 @@ jobs: |
109 | 111 | "${{ steps.build_docker_image_step.outputs.full-image-name }}" \ |
110 | 112 | nvidia-smi |
111 | 113 |
|
112 | | - # --- Install the ORT wheel and run CUDA plugin EP tests --- |
113 | | - - name: Run CUDA Plugin EP Python Tests |
| 114 | + - name: Run CUDA Plugin EP C++ Tests |
114 | 115 | run: | |
115 | 116 | docker run --rm --gpus all \ |
116 | 117 | -v ${{ github.workspace }}:/onnxruntime_src \ |
117 | 118 | -v ${{ runner.temp }}/Release:/build/Release \ |
118 | 119 | -e NVIDIA_VISIBLE_DEVICES=all \ |
| 120 | + -e ORT_UNIT_TEST_MAIN_DYNAMIC_PLUGIN_EP_CONFIG_JSON='{"ep_library_registration_name":"CUDAExecutionProvider","ep_library_path":"libonnxruntime_providers_cuda.so","selected_ep_name":"CUDAExecutionProvider","tests_to_skip":["BeamSearchTest.*","ContribOpAttentionTest.AttentionPastState_dynamic","ContribOpAttentionTest.Attention_Mask1D_Fp32_B2_S64","ContribOpAttentionTest.Attention_Mask2D_Fp32_B2_S32","ConvTest.Conv2D_MatMul_*","CudaPluginArenaTest.DeviceAllocator_ArenaReusesMemory","CudaPluginArenaTest.DeviceAllocator_CudaMemoryIsValid","CudaPluginArenaTest.DeviceAllocator_IsArena","CudaPluginArenaTest.DeviceAllocator_MultipleAllocations","DeformConvTest.Group1OffsetGroup2","GRUTest.*","GreedySearchTest.*","InferenceSessionTests.Test2LayerNestedSubgraph","InferenceSessionTests.Test3LayerNestedSubgraph","InferenceSessionTests.TestArenaShrinkageAfterRun","LSTMTest.*","LogSoftmaxOperator.*","LongformerAttentionTest.*","LoraAdapterTest.VerifyDeviceCopy","PackedAttentionTest.*","PlannerTest.MultiStream","PlannerTest.MultiStream1StreamWaitFor2Streams","PlannerTest.MultiStream2NodesSameStreamConsumedBy1NodeInDifferentStream","PlannerTest.MultiStreamCudaEPNodeCPUOutput","PlannerTest.MultiStreamMultiOutput","RNNTest.*","ReductionOpTest.ArgMax2D_select_last","ReductionOpTest.ArgMin_do_not_keepdims_2_select_last","SamplingTest.*","Scan.MixedExecutionProvidersUnknownDimInSubgraphOutput","Scan8.*","SessionStateTest.TestLayeringPartitioning","SessionStateTest.TestResourceAwarePartitioning_LargeLimit","SessionStateTest.TestResourceAwarePartitioning_NoLimit","SkipGroupNormTest.*","TopKOperator.NthElementBFloat16_NegativeVals"]}' \ |
119 | 121 | ${{ steps.build_docker_image_step.outputs.full-image-name }} \ |
120 | 122 | bash -c " |
121 | 123 | set -ex |
122 | | - export PATH=/opt/python/cp312-cp312/bin:\$PATH |
123 | | - # Ensure libcudart.so.13 is findable regardless of host-runner NVIDIA Container Toolkit configuration. |
124 | | - # The CUDA runtime library lives in the container image at /usr/local/cuda-13.0/lib64, but the |
125 | | - # LD_LIBRARY_PATH may not include this path when the runner's NVIDIA toolkit only mounts driver |
126 | | - # libraries at /usr/local/nvidia/lib64. |
127 | | - export LD_LIBRARY_PATH=/usr/local/cuda-13.0/lib64:\${LD_LIBRARY_PATH:-} |
128 | | -
|
129 | | - # Install the ORT wheel |
130 | | - python -m pip install /build/Release/Release/dist/onnxruntime*.whl |
131 | | -
|
132 | | - # Install test dependencies |
133 | | - python -m pip install numpy onnx |
134 | | - python -m pip install torch --index-url https://download.pytorch.org/whl/cpu |
135 | | -
|
136 | | - # Set plugin path and run tests |
137 | | - export ORT_CUDA_PLUGIN_PATH=/build/Release/Release/libonnxruntime_providers_cuda_plugin.so |
138 | | - echo \"ORT_CUDA_PLUGIN_PATH=\$ORT_CUDA_PLUGIN_PATH\" |
139 | | - ls -la \$ORT_CUDA_PLUGIN_PATH |
140 | | -
|
141 | | - cd /onnxruntime_src/onnxruntime/test/python/transformers |
142 | | - python test_cuda_plugin_ep.py |
| 124 | + export LD_LIBRARY_PATH=/build/Release/Release:/usr/local/cuda-13.0/lib64:\${LD_LIBRARY_PATH:-} |
| 125 | + cd /build/Release/Release |
| 126 | + ./onnxruntime_test_all |
| 127 | + ./onnxruntime_provider_test |
143 | 128 | " |
144 | 129 |
|
145 | | - # --- Run the CUDA plugin EP C++ GoogleTest binary --- |
146 | | - # onnxruntime_provider_test is built into the artifact and links the plugin tests |
147 | | - # (gated by ORT_UNIT_TEST_HAS_CUDA_PLUGIN_EP). These tests register the plugin .so via |
148 | | - # GetSharedLibraryFileName("onnxruntime_providers_cuda_plugin"), which returns the |
149 | | - # platform-specific filename without a directory component. Run from /build/Release/Release |
150 | | - # so that filename resolves to the plugin .so built there. |
151 | | - # The filter covers every CUDA plugin EP suite linked into this binary: |
152 | | - # CudaPlugin* -> CudaPluginUserStreamGraphTest, CudaPluginArenaTest, |
153 | | - # CudaPluginPartitioningTest, CudaPluginProfilingTest |
154 | | - # CudaResourcePartitioning* -> CudaResourcePartitioningTest |
155 | | - - name: Run CUDA Plugin EP C++ Tests |
| 130 | + - name: Run CUDA Plugin EP Python Tests |
156 | 131 | run: | |
157 | 132 | docker run --rm --gpus all \ |
158 | 133 | -v ${{ github.workspace }}:/onnxruntime_src \ |
159 | 134 | -v ${{ runner.temp }}/Release:/build/Release \ |
160 | 135 | -e NVIDIA_VISIBLE_DEVICES=all \ |
| 136 | + -e ORT_TEST_CUDA_PLUGIN_EP=1 \ |
161 | 137 | ${{ steps.build_docker_image_step.outputs.full-image-name }} \ |
162 | 138 | bash -c " |
163 | 139 | set -ex |
164 | 140 | export PATH=/opt/python/cp312-cp312/bin:\$PATH |
165 | | - # Make libcudart.so.13 (and the plugin's CUDA deps) findable; see note above. |
166 | 141 | export LD_LIBRARY_PATH=/build/Release/Release:/usr/local/cuda-13.0/lib64:\${LD_LIBRARY_PATH:-} |
167 | | -
|
168 | | - cd /build/Release/Release |
169 | | - ls -la onnxruntime_provider_test libonnxruntime_providers_cuda_plugin.so |
170 | | - ./onnxruntime_provider_test --gtest_filter='CudaPlugin*:CudaResourcePartitioning*' |
| 142 | + python -m pip install /build/Release/Release/dist/onnxruntime*.whl |
| 143 | + python -m pip install numpy onnx |
| 144 | + python -m pip install torch --index-url https://download.pytorch.org/whl/cpu |
| 145 | + cd /onnxruntime_src/onnxruntime/test/python/transformers |
| 146 | + python test_cuda_plugin_ep.py |
171 | 147 | " |
| 148 | +
|
0 commit comments