Update Windows Github Action to use static build path on local disk#448
Conversation
Modified kubernetes release config yaml to make the github workspace an `emptydir` volume mount for `/home/runner/_work` to preserve existing src and ccache paths while separating from build `tmpbuild-dir` volume
| - name: "Create build dir" | ||
| shell: powershell | ||
| run: | | ||
| $currentTime = (Get-Date).ToString('HHmmss') | ||
| $buildDir = "$env:BASE_BUILD_DIR_POWERSHELL\$currentTime" | ||
| $buildDir = "$env:BASE_BUILD_DIR_POWERSHELL\" | ||
| echo "BUILD_DIR_POWERSHELL=$buildDir" >> $env:GITHUB_ENV | ||
| mkdir "$buildDir" | ||
| Write-Host "Generated Build Directory: $buildDir" | ||
| $bashBuildDir = $buildDir -replace '\\', '/' -replace '^C:', '/c' | ||
| $bashBuildDir = $buildDir -replace '\\', '/' -replace '^B:', '/b' | ||
| echo "BUILD_DIR_BASH=$bashBuildDir" >> $env:GITHUB_ENV | ||
| Write-Host "Converted Build Directory For Bash: $bashBuildDir" | ||
| $fs = Get-PSDrive -PSProvider "FileSystem" | ||
| $fsout = $fs | Select-Object -Property Name,Used,Free,Root | ||
| $fsout | % {$_.Used/=1GB;$_.Free/=1GB;$_} | Write-Host | ||
| get-disk | Select-object @{Name="Size(GB)";Expression={$_.Size/1GB}} | Write-Host |
There was a problem hiding this comment.
My general preference for this sort of runner-specific code is to put it in the runner configuration itself, possibly in:
- The VM configuration (e.g. yaml)
- A dockerfile
- A pre-job script (https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/running-scripts-before-or-after-a-job)
That way there can be multiple workflows sharing the same runners without needing to repeat the setup code and the workflows can stay focused on the core steps that a developer would do to reproduce the job on any machine: clone, configure, build.
You could also extract it out to a github action, maybe with a "post" step for the system health logging
| - name: Fetch sources | ||
| run: | | ||
| python ./build_tools/fetch_sources.py --jobs 12 | ||
| python ./build_tools/fetch_sources.py --jobs 96 |
There was a problem hiding this comment.
96 jobs for fetching seems like a lot... can the network actually support that? I would expect it to get pretty severely bottlenecked. We could also teach fetch_sources.py to infer from nproc or use some other heuristic to pick a good default.
There was a problem hiding this comment.
Good catch, I think my intention was to base it on threads and also was experimenting with it. I am not 100% clear on how that argument percolates to the git commands that are run, but from what I understand it passes the jobs argument to the spawned git processes. I think there shouldn't be a network bottleneck (the D96ads_v6 gets 40Gbps of max network bandwidth) assuming Github's servers are adequate.
The theory was, most of the time was spent checking out the many submodules, and applying patches to them, which seemed like a CPU intensive process, so attempt to increase the simultaneous processing of them, but I think it didn't help much as it looked like the whole process is done serially from observing task manager while it was in this step.
All in all though, I think we are trying to prevent having to do a full clone every time and persistently store the source repo files so it can just pull diffs if need be.
| run: cmake --build "${{ env.BUILD_DIR_BASH }}" | ||
| run: cmake --build "${{ env.BUILD_DIR_BASH }}" -j $(nproc --all) |
There was a problem hiding this comment.
Ninja should automatically run with the right parallelism here. Did it not?
There was a problem hiding this comment.
Yeah so, this is a lingering question and was trying that argument out just to test since I was observing the CPU usage metrics from the Azure dashboard for the node only hitting ~60 vcpu usage when i expected 96. It could be that the kubernetes configuration is limiting resource limits but I read it should by default allow pods to use max CPU resources. My next idea was to output CPU metrics monitoring logs from within the VM from either native windows performance counters or hwinfo32 as that may give a more accurate perspective of usage.
- use k8s `emptyDir` volume which automatically uses ephemeral storage if available from the underlying VM (D96ads_v6) - remove Persistent Volume Claim mounts - Mount ephemeral storage at `B:` and `C:\home\runner\_work` to workaround k8s windows image 20Gib max size limit - Allow future use of Spot vms with appropriate Taint - experimenting with 300G (vm has 384G) resource request to allow only one build pod to be assigned per node for TheRock - experimenting with IREE using a more conservative 92G to allow up to 4 builders per node - Reroute `/mnt/azure` from PVC to `emptyDir` in case still in use, while providing isolation Corresponding pull requests for static build path change in windows github actions build workflow iree-org/iree#20665 ROCm/TheRock#448
## Motivation Restore the original parameters from here #448 (comment) after @saienduri noticed the deviation from `build_linux_packages.yml` in a discussion about windows runner disconnects. ## Technical Details Restoring `--jobs 96` to `--jobs 12` in `build_windows_packages.yml` as there is a possibility that runner disconnects could be caused from over utilization of the runner node. Though it is possible that there was an Azure network connectivity outage as local builds were exhibiting an issue where checkouts would fail and interactively block on credential input. ## Test Plan Will watch CI. ## Test Result TBD ## Submission Checklist - [x] Look over the contributing guidelines at https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
## Motivation Bump rocm-systems from 93bc019 to 093b66c (includes fix for hip-tests issue and revert for mathlib hiprtc issues and revert for rccl-test, added revert for miopen failures due to PR 653): Commits: 093b66c (HEAD, origin/develop, origin/HEAD) Revert "SWDEV-546177 - hipModuleGetLoadingMode API impl (#653)" (#3858) d8a0adb [AMD-SMI] Hide libamd_smi.so internal symbols (#3777) d4da458 [rocprofiler-sdk] [Documentation ] Updating changelog (#3827) 19fadeb (origin/users/abchoudh/fix_dispatch_count) [RCCL][Tuner Plugin] Enable tuning of RCCL tuning constants (#3757) b4f5f8a rocr: Fix IPC dmabuf hang with large allocations (#3211) 64efea0 RCCL: allow users to override max and per job memory & fix defaults. (#3797) 9b3dd10 Removing ready_for_review (#3849) 7e43880 [rocprofiler-systems] Update ROCm version to 7.2.0 in CI workflows for Debian, RedHat, and Ubuntu (#3431) 1fdb6b9 [rocshmem] add gda/topology unit tests (#3715) be1ea24 Move hipMipmappedArrayGetMemoryRequirements test to common tests e4513f0 Update amdgpu-windows-interop with latest changes, pal 58aa0bab2ced0cc9ebe8d2d0932db6774feb4e49 2026-03-04(#3773) b1f964d [rocprofiler-compute] Ensure long kernel name fully shows in compute analyze (#3665) 4dcf1e3 SWDEV-567112 - Replace test names (#3787) 33f5f30 ROCM-2428 - fixes hipStreamBatchMemOp invalid operation checks (#3099) 139f4bf [SWDEV-556456] Align HIP_UUID with rocminfo (#3614) 8e89285 Reduce buffers alignment to 4 bytes (#3821) 51be29a AIRUNTIME-125: Consolidate Windows optimization and debug flags (#3825) 1407392 [AMD-SMI] CI: Fix root workflow to use ASIC-specific test filters (#3807) 63f78a9 (origin/users/mcao/fix_rocpdsummary) [ROCM-SMI] Fix DRM include dirs leaking absolute build paths to consumers (#3808) caf2f7e [ROCM-186] amd-smi: Add support for a VRAM and GTT tuning interface (#3636) a0712d4 [TheRock CI] Update projects_to_test lists (#3749) 02090c4 rocrtst: install gfx .hsaco files to share/rocrtst (#3744) 4a0a1cb Merge other simd table (#3696) 0d07657 Add missing kwargs from rocprofiler_add_integration_validate_test in .cmake-format.yaml (#2336) 3a3df30 Optimize device counting service GPU interactions (#1583) 95d9da0 Add SPM Enable flag in build infrastructure (#3677) 12bb943 [rocprofiler-sdk] On-demand GPU profile queue creation/destruction (#3586) 941057c Navi4 tuning table iter 1 (#3052) dbf2b73 [AMD-SMI] Display N/A for cu_occupancy when file is unavailable (#3589) b0efc7c [RCCL] [UT] Add ROCTX test (#3625) ba7a20e Reducing the p2pnChannels for half-subscription A2A on multi-node MI350 (#3381) 75238c9 [clr] Fix memory leak in getOrCreateHostcallBuffer (#3699) af2ee0e [hip-tests] ASAN Check for image support before we create context (#3834) ad44966 Update windows ci subtree in include amdgpu-windows-interop (#3814) c8ad252 [rocprofiler-register] Fix compilation with system fmt/glog (#1243) 7818815 Update README to include dbgapi and debug agent components (#3731) 88e4a78 ROCProfiler and ROCTracer: Modifying deprecation note (#3831) b5918a5 [ROCM-3124-3125-3126] CUID file generation hangs on MI350 systems/CUID test failures/Segmentation fault in CUID example code (#3548) 97a5dd9 Update copyright to use SPDX IDs (#3805) 511730a [rocshmem]: add flood-amo tester (#3653) 2d650a0 [clr] Fix heap use after free error in device allocations (#3789) b6b179a Disable hipHostRegister_Negative test for ASAN (#3832) 39ec318 [RCCL] Add GDA alltoallv via rocshmem integration (#3613) fb0f4d5 [RCCL] [CUMEM] Fix cuMem multi-process runs (#3811) c3de7d4 SWDEV-526201 - Fix and enable disabled HIP tests from warp group (#3089) 8d9a8ca roofline: code cleanup and refactor vector types (#3813) 8957e49 Don't wait on command completion if worker thread is destroyed (#3790) 9e7586a [rocshmem] Add barrier APIs and expose `ROCSHMEM_TEAM_WORLD` on device (#3651) 91b0923 Revert "fix local gpu release static build failure (#3667)" (#3799) 0fda754 libhsakmt: Add secondary KFD context creation support ee43db9 Revert "Update TheRock reference to 20260303 commit (#3709)" (#3826) 86e28b9 Added fix to update GL2C counters instance count for GFX11.5 (#3100) 93f69f7 Adjust includes to match use (#3742) e9fbc3f (develop) Update TheRock reference to 20260303 commit (#3709) be0675a (HEAD) Revert "Support fp8 types in hiprtc (#2605)" (#3792) 3e3a94a [rocprofiler-systems] Add trace_cache support for std::optional<T> serialization (#3490) 0b42a7f clr: Eliminate unnecessary kernel name string copies (#3774) b6b0d77 rocr: Add hsa_amd_memory_async_batch_copy API for batched memory copies (#3259) 486e6d1 Resolve staircase RS regression with 48 max channels (#3684) eb59c85 [gfx942][gfx950] Leverage new cache bypass builtins for simple protocol where available (#2847) 4d74d27 (origin/users/raramakr/rocm-smi-target) Revert "Auto Labeler: Add ci:regression-detection label to rccl PRs (#3543)" (#3769) 8f07955 [AMD-SMI] CI: Use ASIC-specific test blacklists in workflows (#3775) 7cef5b6 Fix MFMA total FLOPS calculation (#3371) aea3751 Remove duplicated tests (#3235) b6c656f Remove duplicated tests in memory module (#3087) ca3137d [rocprofiler-sdk] Install integration tests without building for therock & Misc. fixes (#3047) 0ab5c41 [rdc] Enable on-demand queue mode in rocprofiler-sdk to prevent inference degradation (#3629) a1eb2a1 rocr/wsl: a library should not output to std::out by default (#3718) b7da296 Reenable flood_put/get testers on mlx5 since they should work after pr2732 (#3748) 000e24d [rocprofiler-sdk] Add automatic late-start support to rocprofiler_force_configure (#2168) 64ea87f [hip-tests] Fix memory leaks in hipMemPoolTrimTo tests (#3643) 543a7d7 rocr: Include code object allocs in lightweight coredump a58da37 [rocdecode] - update rocdecode ctest (#3768) f88e4ee [rocprofiler-systems] Make CDash submit non-fatal and add GitHub Actions logging (#3525) cb14deb [rocprofiler-systems] Update nlohmann-json submodule (#3391) 4492530 SWDEV-567112 - Introduce new mechanism for tagging and disabling tests - Part 2 (#3707) 8ca9913 disabling rccl from full build (linux), covered in RCCL CI (#3770) c4fdb20 [ATT] Re-enable tests. Add option to specify perf to target CU only (#2819) 615aab9 ROCM-3816 Out of Memory fix (#3588) 8ffad41 Fix rocm_smi64 exporting invalid absolute paths to consumers (#3717) 042d76a rocr: Remove dependency on KFD in Runtime::VMemoryHandleMap (#2515) 555db59 [AMD-SMI] CPU: Added support for family 1A Models 50h-57h (#3206) 3affa2c [SWDEV-555935] Fix shared mutex and self-heal (#3729) ba0bf0f Replace hipMemGetInfo with ihipMemGetInfo and use it for internal calls. (#2845) c5cef9b Fix HIP_RETURN on all HIP API calls. (#2838) 241ce7b Revert "memory: fix "contiguous_bytes" calculation in generic conversion (#3285)" (#3755) 8a690f4 [kpack/clr] Windows PE/COFF support for kpack artifact splitting and runtime loading (#3728) 863bdf8 MFMA pre-processor guards for ipc.hip (#3724) 90bb9b1 Release queue outside of vgpusAccess lock (#3705) de45239 clr: Add build support of ROCR and PAL backends together (#3722) dfb7abc [rocprofiler-sdk] RCCL API changes for RCCL_API_TRACE_VERSION_PATCH = 3 (#3477) d69d4f2 [AICOMRCCL-633] - Fixed warnings in tests (#3402) 067d86d rocr/wsl: Disable AQL Queue usage with flag ROCR_USE_PM4 (#3663) 594eb60 [TheRock CI] rocm-systems build full ROCm stack (#3182) 27d17e8 [ROCProfiler-SDK] Fix SWDEV-556922: Handle comments before checking for pmc: (#1723) c80d904 memory: fix "contiguous_bytes" calculation in generic conversion (#3285) 669987c [hip-tests] ASAN - add missing release handles (#3735) a24bbd7 fix local gpu release static build failure (#3667) 259b2ff Speed up DeviceId (#2803) 65d9264 Simplify MPI trace merge logic and remove legacy guards (#3562) 1076c08 use system to look for zcat path instead (#3720) 22f1d19 [AICOMRCCL-355] Enable threshold-based p2p-batching (#3000) a2e4c79 Partially flatten template tests cases (#2597) e242abe Pass space separated gfx target list to RCCL build command (#3701) 4f78aea SWDEV-570074 - Refactor Memset memory object handling. (#2228) b3ad12d Support Nvidia build on theRock for HIP-tests (#3335) a1cf15e Support fp8 types in hiprtc (#2605) 8ef84b0 [rocprofiler-systems] Add HPC examples to automated testing (#3437) db3a70d Free memory which was allocated in tests (#3710) 27e6809 [rocprofiler-systems]: Fix rhel CI failure on for MPI and UCX tests (#3700) 0d9aaf5 rccl/topo_expl: fix build issue. (#3719) be04d75 Fix zcat path used for checking kernel configs (#3423) cab60a7 rocr/thunk/win: Add CU mask support (#3518) 5b3d826 [CUMEM] Initial support for cuMem APIs (#2763) 0606ff4 [HIP] [PLAT-194496] Improve Stress_hipMalloc_HighSizeAlloc reliability (#3550) 05750a7 fix hip-test name in config (#3716) 33f777f hsakmt: Remove --high functionality from run_kfdtest.sh (#2486) e4c46e3 Hide the retain under direct dispatch check (#3698) bfe0ca0 Add rocprof trace decoder to CI tests (#3690) a769b6f [rocSHMEM] Edgar/abstract allocator ipc part1 (#3411) 659fb52 [AMD-SMI] Fix bugs, improve error handling, and clean up NIC/switch code (#3654) 0eb26ea hsakmt: Fix Import/Export of dmabuf_fd for WSL/Windows (#3348) a122936 [SWDEV-567812] Add UBB power and power_limit fields to npm_info (#3262) c3bec09 [rocprofiler-sdk][rocprofv3][rocpd] Updates for KFD data (#340) 7c44d47 SWDEV-547659 - Remove HIP_VERSION_GITHASH in logs (#448) 74b6487 SWDEV-547008 - Documentation fix for function return values (#463) af21cd4 SWDEV-545553 - Improve clarity and robustness of CALLBACK unit tests (#546) 180d639 SWDEV-544900 - Change hip-test test case name (#547) feeca99 Doc improvements (#3688) c1822b6 ROCprofiler-SDK: deprecation of legacy tools (#3609) 5d7aff8 Fix rocprof-compute-viewer link (#3459) 0b0b484 AIRUNTIME-129 - Fix Ocl test failures of 2D image with pitches. (#3584) ac569b8 Fix memory tests config (#3687) 603fe7a [hip-tests] Enable hipMipmappedArrayGetMemoryRequirements test via cmake 4fad445 [hip] Docs: Updates to some memory management pages 8cc5955 AICOMRCCL-656 fix memory leak in ncclCommInitRankFunc (#3628) 94a4595 Fix missing amd_comgr linkage in pc-sampling integration test (#3453) 2a68565 rocrtst: CMAke file: strip xnack/feature suffixes from gfxNum in build_kernel (#3652) c3542bf [rocprofv3] Deprecating input text files for counter collection (#1562) ff122e7 SWDEV-573073 - Cleanup hipHostAlloc/Malloc/Register tests (#3017) 5b1deaf SWDEV-567112 - Introduce new mechanism for tagging and disabling tests - Part 1 - Core (#2351) 6e0cc30 rocrtst: MaxSingleAllocationTest: skip CPU NUMA nodes >0 (#3208) d65f601 [AICOMRCCL-667] rccl: Change GDR selection logic. (#3607) f1c44ab Patch Back to Old Repo: fixes from manual runs (#3621) fe53bcd [AMD-SMI] Allow amdsmi init to succeed when no NIC hardware is present (#3403) b25600e [ROCM SMI] Fix fw pldm version not displayed in default amd-smi (#3594) 169d2ef root to module wiring, remove legacy source collection (#3482) 7469781 [LRT][clr] SWDEV-512963-Fix CTS test failures for 1D buffer copy (#3520) c8f55d9 Adding rocprof trace decoder (#3576) 425e983 Trace decoder codeowners (#3600) a176efd [hip-tests] Add return statements to HIP_SKIP_TEST (#3647) 32687cf rocrtst: CPUAccessToGPUMemoryTest: Cap host allocation to 512 MB under ASAN (#3407) 97c0206 Update codeowners for thunk DXG (#3334) be44b28 [rocdecode][rocjpeg] - ctest CMakeLists cleanup (#3632) 80ff0b8 Various memory leak fixes in hip-tests (#3605) 0988f67 fix typo in help text (#3314) 9f823c5 Fix CUID file lookup by loading files before searching entries (#3436) 064c892 SWDEV-546177 - hipModuleGetLoadingMode API impl (#653) 006213e ROCM-2696: Ignare size and base if null ptr (#3336) 6060b99 Improve atomic min max test perf (#2580) 3fbcc13 Change printf capture impl (#1127) 93bc019 (tag: hip-version_7.12.60610, origin/users/mradosav-amd/rocprofsys-selective-region) [ROCM-CORE] Update rdhc script to support rocm install prefix (ROCm/rocm-systems#3596) [AICOMRCCL-355]: https://amd-hub.atlassian.net/browse/AICOMRCCL-355?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

emptyDirstorage mountStandard_D96ads_v6,Standard_HX176rs,Standard_HB176rs_v4(Old was Standard_D64s_v3)#132