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

patch_hostside aborts on windows #62

Open
welnaseth opened this issue Feb 6, 2018 · 2 comments
Open

patch_hostside aborts on windows #62

welnaseth opened this issue Feb 6, 2018 · 2 comments

Comments

@welnaseth
Copy link

Greetings,

I know the windows platform isn't entirely supported, but I figured I'd see if you could point me in the right direction for fixing my issue. I was able to compile coriander successfully (with one code tweak to fix a compilation error) and now I'm trying to get cocl_py cuda_sample.cu to run.

I've had to do a few things to get it to run:

  1. I had to pass in the cocl-include flag due to so weird issues with the cocl-include prefix, but I think that's because I built from master instead of win-build because I thought win-build had been merged in.

  2. cocl_py passes in std=c++11 flags to clang, this causes issues with compiling since the c++ sources from Visual Studio are c++14 sources, meaning some of the fuctions in algorithms are now constexpr. I was able to fix these issues by removing the flags.

With these few changes, it starts running, and makes it most of the way through. However, when patch_hostside runs, it exits with a Microsoft Visual C++ Runtime Library Debug error saying abort() had been called. The related output in the log is below:

/coriander/bin\patch_hostside --hostrawfile cuda_sample-hostraw.ll --devicellfile cuda_sample-device.ll --hostpatchedfile cuda_sample-hostpatched.ll While deleting: void (float*, i32, float)* %�?setValue@@YAXPEAMHM@Z Use still stuck around after Def is destroyed: <badref> = bitcast void (float*, i32, float)* @"\01?setValue@@YAXPEAMHM@Z" to i8* Assertion failed: use_empty() && "Uses remain when a value is destroyed!", file E:\Users\welna\Downloads\llvm-4.0.0.src.tar\llvm-4.0.0.src\lib\IR\Value.cpp, line 85 Traceback (most recent call last): File "/coriander/bin/cocl.py", line 384, in <module> '--hostpatchedfile', '%s-hostpatched.ll' % OUTPUTBASEPATH File "/coriander/bin/cocl.py", line 281, in run print(check_output(cmdline_list)) File "/coriander/bin/cocl.py", line 48, in check_output res = subprocess.check_output(cmd_list) File "E:\Users\welna\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 336, in check_output **kwargs).stdout File "E:\Users\welna\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 418, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['/coriander/bin\\patch_hostside', '--hostrawfile', 'cuda_sample-hostraw.ll', '--devicellfile', 'cuda_sample-device.ll', '--hostpatchedfile', 'cuda_sample-hostpatched.ll']' returned non-zero exit status 3.

Any ideas what the issue could be? If you can point it out, I could probably fiddle around with it and fix it myself, but I have no idea where to begin after googling similar issues since I'm not familiar with the patch_hostside code base.

@akostadinov
Copy link

Would you list steps to compile on windows?

@hughperkins
Copy link
Owner

Looks like a bug in the program. Someone would need to run using a debugger. First steps would be for someone to document how to install and compile on windows, to get this far. Then someone else might be able to pick that up, and run it in a debugger. Etc.

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

No branches or pull requests

3 participants