-
Notifications
You must be signed in to change notification settings - Fork 118
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
Compilation error for the dot product example #331
Comments
I don't think the problem you're experiencing is due to to the version of nvcc you're using, rather it is a consequence of using windows and msvc. See #234. |
Ok. Would the LLVM or Opencl backends work, or is this error just specific to Cuda? Edit: I see that the LLVM backend is still in the experimental state, so nevermind that. The issue is probably specific to the Cuda backend as well. Tracing the issue, I see that there was a flurry of activity on lambda expressions last year to fix this for NVRTC and Windows. I see that there was a fix by @mwu-tow. What is the status of that? |
The LLVM work is progressing and the CPU backend is complete. If you have some spare cycles and wouldn't mind trying to install it, I would appreciate any feedback on that (I don't know of anybody who has tried to install it on windows yet). |
Ok, I gave it a shot. When I tried to install llvm-general Haskell package it complained that it was missing llvm-config. It was not in the prebuilt Windows binary, so I build the 3.9.0.0 source with Cmake+VS2015. That did not works as the llvm-config version needed to be 3.5.x, so I got 3.5.2.0 and built that and added it to PATH. Now it is complaining that it is missing:
To be honest, I've already been trying to install it for two hours so I will just stop here. I could try building it with GCC maybe as some files did fail to build with VS...actually, let me do that and I will stop there if that fails. Edit: No, I get the same error unfortunately. There seem to be some build issues in 3.5.2.0 in general unlike in 3.9.0.0, as I saw some warnings about unsupported instructions. The |
Thanks for the feedback @mrakgr! On mac/linux we need to have LLVM built with shared library support (which I think is the default) so that we can use it with ghci/template haskell, which I guess is the error you are getting here. I don't know if the windows config has similar option though; I'll set up a windows VM or something one day and try it out. |
I see. Actually, I did notice there was an option for shared libraries, but there were like 100 other options so I just opted for the defaults. |
I once tried using Haskell for cross-platform development. It was painful, painful, painful. I don't particularly want to remember… but I guess I can give you some advice, since I got accelerate-cuda backend working without any visible platform-specific issues on Windows. The issue you encountered is #234 — I believe the patch is fairly simple and regular, should work against recent As for the LLVM thing… you can try it if you are brave. Some suggestions:
Note that I'm referring to Cabal library that is used both by cabal-install and stack — you are using it, although not directly. Some Haskell packages also ask Cabal to rely on pkg-config to detect libraries.
Good luck! |
Wow, thanks @mwu-tow for the excellent comments! |
@mrakgr Also, I noticed that there's MinGW build of LLVM 3.5.2 on MSYS2 repository — so building it from scratch might not be necessary. @tmcdonell While I do like ranting, I have no regrets. Learning Haskell and porting our packages to Windows have been a very valuable experience (even though we eventually decided to slowly move towards C++ anyway). It's great language and I'd really like for it to became more available for cross-platform development. I'd say that there's a vicious circle — Haskell doesn't work properly on Windows <-> Haskell developers don't use Windows. It needs to be steadily improved, package after package. If I can help by sharing my experience, I'm happy to. Always feel free to ping / mail me (sometimes I do miss github pings), when there's some issue that you think I could help with. GHC also improves — given the current pace, things could become quite solid after a few more major releases: handling external libraries and the linker received many fixes by GHC 8, proper DLL support is slated for 8.2, there's still that IO manager thing remaining — and that's pretty much all the big blocker things I'm aware of. |
closing as |
This is on Windows 10 and the accelerate-cuda backend.
accelerate.hs
Output:
This happens using the REPL as well. The only ghc compiler flag is -threaded.
Here are the files in the temp directory:
dragon4118467.cu
(I've added the comments to indicate where lines 25 and 29 are)dragon633426500.cu
I'll skip the cubin file. I haven't done extensive testing why this is happening, I am trying out Accelerate for the first time here. It might be because I am using the
nvcc
from Cuda 7.5 SDK. I'll give the one from 7.0 a shot.Edit: It makes no difference whether I am using
nvcc
from 7.0 or 7.5.The text was updated successfully, but these errors were encountered: