[GH-ISSUE #574] Windows ROCm wheel setup: unnormalized long paths leave device-library links missing, causing rocBLAS crashes #235

Open
opened 2026-10-29 21:23:03 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @sakugetu on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/574

Summary

Native Windows setup with Maya v1.1.31 reached model loading, but generation crashed in rocBLAS with 0xC0000005. The installed ROCm wheel contained the required files; the SDK's generated development tree was missing most of its device-library links.

This appears to be a TheRock SDK path-handling problem exposed by Maya's Windows wheel-install path, rather than a Maya kernel bug. Reporting it here because it can make a successful-looking setup unusable.

Environment

  • Maya v1.1.31, commit c4be54416a4f30a837c2fae91816dc9550d68b61
  • Radeon 8060S, gfx1151, 128 GB unified memory, 96 GB assigned to graphics
  • Native Windows 11 Pro 25H2, build 26200.9711
  • GPU driver 32.0.31007.5012; Visual Studio Build Tools 2022
  • ROCm SDK 7.14.1 from AMD's official Python wheels, in an isolated virtual environment under a relatively deep project directory
  • DeepSeek-V4.1-Flash-1017 Maya-XS; the crash also reproduces without loading any model
  • LongPathsEnabled=0, unchanged during diagnosis and repair

What was observed

After rocm-sdk init:

  • The official device wheel and _rocm_sdk_libraries/bin/rocblas/library/gfx1151 contained 150 files.
  • _rocm_sdk_devel/bin/rocblas/library/gfx1151 contained only Kernels.so-000-gfx1151.hsaco and TensileLibrary_lazy_gfx1151.dat.
  • The TensileLibrary_Type_* files referenced by the lazy library were missing from the generated tree.
  • A minimal Python probe loading rocblas.dll with ctypes.CDLL and calling rocblas_initialize() crashed with the default lookup and with ROCBLAS_TENSILE_LIBPATH pointing to the incomplete devel directory.
  • Pointing the same process to the complete _rocm_sdk_libraries/.../gfx1151 directory made the probe exit successfully. The failing stack was around Tensile::LoadLibraryFilePreload.
  • ROCm 7.14.0 also failed when arranged in the same incomplete layout; this is not evidence of a 7.14.1-only runtime regression.

In the installed SDK's rocm_sdk/_devel.py, a link target assembled as dest_path.parent / "../../../../../..." was checked without normalization. For one real file, the unnormalized path was 282 characters and its existence check returned false; resolving it produced a 223-character path and returned true. The two files that did get linked had shorter unnormalized paths (226–229 characters).

Workaround validated locally

Two expressions in the installed SDK were normalized before checking/using the target:

-return dest_path.samefile(dest_path.parent / target)
+return dest_path.samefile((dest_path.parent / target).resolve())

-hardlink_target = dest_path.parent / link["target"]
+hardlink_target = (dest_path.parent / link["target"]).resolve()

Then rocm-sdk init was run again. All 254 device-manifest links were checked against their source files, and the rocBLAS directory had all 150 files. The default-path rocBLAS probe passed. A separate hipBLASLt initialization crash seen with the partial workaround also stopped after the full link repair.

No driver update, Windows long-path setting change or other OS change was needed. Merely redirecting rocBLAS was not enough because other SDK libraries had missing links too.

Suggested handling

  • A setup check that validates the device-library links, not only that the package is installed, would catch this before the large model is loaded.
  • Warn or fail clearly when SDK link targets cannot be found, rather than continuing with a partial tree.
  • Document a short installation root as a precaution, and consider an upstream TheRock fix to normalize relative link targets. The local patch above is a workaround, not a claim that every long-path case is covered.

I have not validated current TheRock main or other GPUs. Maya's Windows support PR #69 noted that the wheel path had not been exercised in that test. There was also a separate HIP Release-flags issue after the failed initial configure; repairing these SDK links alone fixed the crashes, not the remaining extreme slowness.

Originally created by @sakugetu on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/574 ## Summary Native Windows setup with Maya v1.1.31 reached model loading, but generation crashed in rocBLAS with `0xC0000005`. The installed ROCm wheel contained the required files; the SDK's generated development tree was missing most of its device-library links. This appears to be a TheRock SDK path-handling problem exposed by Maya's Windows wheel-install path, rather than a Maya kernel bug. Reporting it here because it can make a successful-looking setup unusable. ## Environment - Maya v1.1.31, commit `c4be54416a4f30a837c2fae91816dc9550d68b61` - Radeon 8060S, `gfx1151`, 128 GB unified memory, 96 GB assigned to graphics - Native Windows 11 Pro 25H2, build 26200.9711 - GPU driver 32.0.31007.5012; Visual Studio Build Tools 2022 - ROCm SDK 7.14.1 from AMD's official Python wheels, in an isolated virtual environment under a relatively deep project directory - DeepSeek-V4.1-Flash-1017 Maya-XS; the crash also reproduces **without loading any model** - `LongPathsEnabled=0`, unchanged during diagnosis and repair ## What was observed After `rocm-sdk init`: - The official device wheel and `_rocm_sdk_libraries/bin/rocblas/library/gfx1151` contained 150 files. - `_rocm_sdk_devel/bin/rocblas/library/gfx1151` contained only `Kernels.so-000-gfx1151.hsaco` and `TensileLibrary_lazy_gfx1151.dat`. - The `TensileLibrary_Type_*` files referenced by the lazy library were missing from the generated tree. - A minimal Python probe loading `rocblas.dll` with `ctypes.CDLL` and calling `rocblas_initialize()` crashed with the default lookup and with `ROCBLAS_TENSILE_LIBPATH` pointing to the incomplete devel directory. - Pointing the same process to the complete `_rocm_sdk_libraries/.../gfx1151` directory made the probe exit successfully. The failing stack was around `Tensile::LoadLibraryFilePreload`. - ROCm 7.14.0 also failed when arranged in the same incomplete layout; this is not evidence of a 7.14.1-only runtime regression. In the installed SDK's `rocm_sdk/_devel.py`, a link target assembled as `dest_path.parent / "../../../../../..."` was checked without normalization. For one real file, the unnormalized path was 282 characters and its existence check returned false; resolving it produced a 223-character path and returned true. The two files that did get linked had shorter unnormalized paths (226–229 characters). ## Workaround validated locally Two expressions in the installed SDK were normalized before checking/using the target: ```diff -return dest_path.samefile(dest_path.parent / target) +return dest_path.samefile((dest_path.parent / target).resolve()) -hardlink_target = dest_path.parent / link["target"] +hardlink_target = (dest_path.parent / link["target"]).resolve() ``` Then `rocm-sdk init` was run again. All 254 device-manifest links were checked against their source files, and the rocBLAS directory had all 150 files. The default-path rocBLAS probe passed. A separate hipBLASLt initialization crash seen with the partial workaround also stopped after the full link repair. No driver update, Windows long-path setting change or other OS change was needed. Merely redirecting rocBLAS was not enough because other SDK libraries had missing links too. ## Suggested handling - A setup check that validates the device-library links, not only that the package is installed, would catch this before the large model is loaded. - Warn or fail clearly when SDK link targets cannot be found, rather than continuing with a partial tree. - Document a short installation root as a precaution, and consider an upstream TheRock fix to normalize relative link targets. The local patch above is a workaround, not a claim that every long-path case is covered. I have not validated current TheRock main or other GPUs. Maya's Windows support PR #69 noted that the wheel path had not been exercised in that test. There was also a separate HIP Release-flags issue after the failed initial configure; repairing these SDK links alone fixed the crashes, not the remaining extreme slowness.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#235
No description provided.