Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Using HIP under wine leads to a crash #115

Open
opcod3 opened this issue Dec 16, 2024 · 8 comments
Open

[Issue]: Using HIP under wine leads to a crash #115

opcod3 opened this issue Dec 16, 2024 · 8 comments

Comments

@opcod3
Copy link

opcod3 commented Dec 16, 2024

Problem Description

Running a HIP application under wine causes the following assertion to be triggered:

/usr/src/debug/rocm-opencl-runtime/clr-rocm-6.2.4/rocclr/os/os_posix.cpp:321: static void amd::Os::currentStackInfo(unsigned char**, size_t*): Assertion `Os::currentStackPtr() >= *base - *size && Os::currentStackPtr() < *base && "just checking"' failed.

I came upon this issue when attempting to implement a hip analog for cuda wine libs. Basically a HIP version of https://github.com/SveSop/nvidia-libs

This happens both when calling hipInit or any other function from the proxy dll.
It also happens when running an OpenCL application.

Operating System

Arch Linux

CPU

AMD Ryzen 9 9950x

GPU

AMD Radeon 7900XTX, AMD Radeon 780M

ROCm Version

ROCm 6.2.4

ROCm Component

clr

Steps to Reproduce

  1. Download windows version of this tool: https://github.com/ProjectPhysX/OpenCL-Benchmark/releases/
  2. Run it through wine wine64 OpenCL-Benchmark-Windows.exe

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

@cjatin
Copy link
Contributor

cjatin commented Dec 17, 2024

If you are on linux (using WINE) why dont you use the LINUX binaries directly? HIP uses different backends for Linux and Windows and they might not be compatible with each other.
Bringing the compatibility to a translation layer might require a lot of work.

@opcod3
Copy link
Author

opcod3 commented Dec 17, 2024

Well not all applications have Linux binaries available. I believe this is not really related to different backends as OpenCL should work fine independently of vendor. That's not necessarily the case when attempting to port HIP directly

@cjatin
Copy link
Contributor

cjatin commented Dec 18, 2024

Which application are you trying to run?
And how are you running it, can you please share the steps.

@opcod3
Copy link
Author

opcod3 commented Dec 23, 2024

I was trying to run cinebench, just as an interesting exercise. But the problem occurs with OpenCL as well. Like I described in my bug report. You can reproduce it with the benchmark.

This is an issue only with non-release builds (such as the ones archlinux packages). I still think this is an upstream issue because it indicates that the assert is incorrect. As if it is patched out the program runs without any apparent issues.

@taylding-amd
Copy link

I just checked with the development team regarding your request. Unfortunately, we do not support or test WINE at this time. Additionally, I noticed that you are using Arch Linux. It's important to mention that ROCm does not officially support this operating system (Compatibility matrix - ROCm). As a result, we do not conduct testing or provide support for ROCm on Arch. While it’s possible that some features may work, you might encounter unexpected environmental issues.

Since the bug you reported occurs only in non-release builds on Arch Linux, we are unlikely to address it due to our limited resources.

Thank you for your understanding. Is there anything else I can assist you with before we close this issue?

@opcod3
Copy link
Author

opcod3 commented Jan 7, 2025

Hello,

After further testing it seems either compiling as Release or commenting out the Assert makes the system work. Not just OpenCL but hip as well (with a specifically made hip forwarding dll).

It seems the assert triggers even when it should not, I don't think this is necessarily a distro issue but rather an issue of the assert not being 100% representative of the code's expectations. I would ask you to update it if possible as to better represent the requirements of the code.

To me it feels like a relatively trivial issue with the assert, and not a problem with any underlying code.

@taylding-amd
Copy link

Thank you for sharing your concerns regarding this assertion. I could be mistaken, but I believe that the assertion failure may be related to the operating system. Would you mind testing it directly on Ubuntu 22.04 or any of the officially supported operating systems?

@opcod3
Copy link
Author

opcod3 commented Jan 8, 2025

I'll test on a supported distro as soon as I have the time to set it up and compile ROCm with assertions enabled (unless you can point me to such a precompiled version if it exits).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants