Skip to content

feat(bindings): skip binding test on WSL2 for prebuilt CUDA binaries#601

Open
cyncuiuh8207 wants to merge 2 commits into
withcatai:masterfrom
cyncuiuh8207:master
Open

feat(bindings): skip binding test on WSL2 for prebuilt CUDA binaries#601
cyncuiuh8207 wants to merge 2 commits into
withcatai:masterfrom
cyncuiuh8207:master

Conversation

@cyncuiuh8207
Copy link
Copy Markdown

WSL2 reports Ubuntu in /etc/os-release but the WSL-specific kernel environment causes binding tests to fail even when the prebuilt CUDA binary is actually compatible.

Changes:

  • Add checkIfWSL2() in getLinuxDistroInfo.ts: reads /proc/sys/kernel/osrelease and checks for 'wsl2' or 'microsoft' substring
  • getLinuxDistroInfo() now returns wslDistro field
  • getPlatformInfo() propagates wslDistro to BinaryPlatformInfo type
  • getShouldTestBinaryBeforeLoading(): skip binding test when wslDistro=true

Tested on WSL2 (Ubuntu 26.04, RTX 4070 Ti SUPER, CUDA prebuilt binary). Logic tests confirm WSL2 skips binding test while normal Linux does not.

Closes WSL2 CUDA binding compatibility issue.

Description of change

Pull-Request Checklist

  • Code is up-to-date with the master branch
  • npm run format to apply eslint formatting
  • npm run test passes with this change
  • This pull request links relevant issues as Fixes #0000
  • There are new or updated unit tests validating the change
  • Documentation has been updated to reflect this change
  • The new commits and pull request title follow conventions explained in pull request guidelines (PRs that do not follow this convention will not be merged)

WSL2 reports Ubuntu in /etc/os-release but the WSL-specific kernel
environment causes binding tests to fail even when the prebuilt CUDA
binary is actually compatible.

Changes:
- Add checkIfWSL2() in getLinuxDistroInfo.ts: reads /proc/sys/kernel/osrelease
  and checks for 'wsl2' or 'microsoft' substring
- getLinuxDistroInfo() now returns wslDistro field
- getPlatformInfo() propagates wslDistro to BinaryPlatformInfo type
- getShouldTestBinaryBeforeLoading(): skip binding test when wslDistro=true

Tested on WSL2 (Ubuntu 26.04, RTX 4070 Ti SUPER, CUDA prebuilt binary).
Logic tests confirm WSL2 skips binding test while normal Linux does not.

Closes WSL2 CUDA binding compatibility issue.
…verage

- Add /usr/lib/os-release fallback to mock implementations
- Add proper mock return values for each os-release path
- Re-test in actual WSL2 environment: WSL2 detected, binding test skipped
- Note: vitest shows Bus error in this environment (addon loading issue)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant