1616# - main, nightly, PRs: install from git (latest dev)
1717# - Can be overridden with tensordict_source input
1818#
19- # Wheel Variants:
20- # - cpu (default): Recommended for torchrl - avoids duplicate filename conflicts
21- # - gpu: Only CUDA builds
22- # - all: All variants (with deduplication to prevent corruption )
19+ # Wheel Variants (selectable via checkboxes) :
20+ # - build_cpu (default: true ): Recommended for torchrl - pure Python library
21+ # - build_cuda (default: false): CUDA builds (Linux, Windows)
22+ # - build_rocm (default: false): ROCm builds (Linux only )
2323#
2424# NOTE: This workflow is NOT automatically triggered on tag push to avoid
2525# race conditions with wheel builds. Use workflow_dispatch to trigger releases.
5757 - ' stable'
5858 - ' git'
5959 default : ' auto'
60- wheel_variants :
61- description : ' Which wheel variants to collect (cpu recommended for torchrl)'
60+ build_cpu :
61+ description : ' Build CPU wheels ( recommended for torchrl - pure Python library )'
6262 required : false
63- type : choice
64- options :
65- - ' cpu'
66- - ' gpu'
67- - ' all'
68- default : ' cpu'
63+ type : boolean
64+ default : true
65+ build_cuda :
66+ description : ' Build CUDA wheels'
67+ required : false
68+ type : boolean
69+ default : false
70+ build_rocm :
71+ description : ' Build ROCm wheels (Linux only)'
72+ required : false
73+ type : boolean
74+ default : false
6975
7076# Ensure only one release workflow runs at a time
7177# cancel-in-progress: true means new runs cancel previous ones
@@ -259,6 +265,9 @@ jobs:
259265 test-infra-ref : ${{ inputs.pytorch_release || 'main' }}
260266 tensordict-source : ${{ inputs.tensordict_source || 'auto' }}
261267 channel : release
268+ with-cpu : ${{ inputs.build_cpu && 'enable' || 'disable' }}
269+ with-cuda : ${{ inputs.build_cuda && 'enable' || 'disable' }}
270+ with-rocm : ${{ inputs.build_rocm && 'enable' || 'disable' }}
262271 secrets : inherit
263272
264273 build-windows :
@@ -271,6 +280,8 @@ jobs:
271280 test-infra-ref : ${{ inputs.pytorch_release || 'main' }}
272281 tensordict-source : ${{ inputs.tensordict_source || 'auto' }}
273282 channel : release
283+ with-cpu : ${{ inputs.build_cpu && 'enable' || 'disable' }}
284+ with-cuda : ${{ inputs.build_cuda && 'enable' || 'disable' }}
274285 secrets : inherit
275286
276287 build-macos :
@@ -283,6 +294,7 @@ jobs:
283294 test-infra-ref : ${{ inputs.pytorch_release || 'main' }}
284295 tensordict-source : ${{ inputs.tensordict_source || 'auto' }}
285296 channel : release
297+ with-cpu : ${{ inputs.build_cpu && 'enable' || 'disable' }}
286298 secrets : inherit
287299
288300 build-aarch64 :
@@ -295,6 +307,7 @@ jobs:
295307 test-infra-ref : ${{ inputs.pytorch_release || 'main' }}
296308 tensordict-source : ${{ inputs.tensordict_source || 'auto' }}
297309 channel : release
310+ with-cpu : ${{ inputs.build_cpu && 'enable' || 'disable' }}
298311 secrets : inherit
299312
300313 # =============================================================================
@@ -330,12 +343,9 @@ jobs:
330343 uses : actions/download-artifact@v4
331344 with :
332345 path : wheels-raw
333- # Pattern based on wheel_variants input:
334- # - cpu: Only CPU builds (recommended - avoids duplicate wheel conflicts)
335- # - gpu: Only CUDA builds
336- # - all: All variants (requires deduplication)
346+ # Download all pytorch_rl artifacts - filtering by selected variants happens below
337347 # pytorch/test-infra uploads artifacts named like: pytorch_rl__3.11_cpu_x86_64
338- pattern : ${{ inputs.wheel_variants == 'gpu' && 'pytorch_rl__*_cu*' || inputs.wheel_variants == 'all' && ' pytorch_rl*' || 'pytorch_rl__*_cpu_*' }}
348+ pattern : pytorch_rl*
339349 merge-multiple : true
340350
341351 - name : Deduplicate and verify wheels
0 commit comments