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

CUDA 10 got a different path for libdevice #143

Open
ProfFan opened this issue Mar 5, 2019 · 13 comments
Open

CUDA 10 got a different path for libdevice #143

ProfFan opened this issue Mar 5, 2019 · 13 comments

Comments

@ProfFan
Copy link

ProfFan commented Mar 5, 2019

./image_warping 
width 512, height 512
numActivePixels: 101406
linkllvm(/usr/local/cuda/nvvm/libdevice/libdevice.compute_30.10.bc): No such file or directory

patch at util.t:

local cuda_compute_version = 30
-- local libdevice = terralib.cudahome..string.format("/nvvm/libdevice/libdevice.compute_%d.10.bc",cuda_compute_version)
local libdevice = terralib.cudahome.."/nvvm/libdevice/libdevice.10.bc"

After it works fine.

@gerwang
Copy link

gerwang commented Apr 14, 2019

But after modifying util.t, I encountered following error:

warning: Linking two modules of different data layouts: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0/nvvm/libdevice/libdevice.10.bc' is '' whereas 'external' is 'e-m:w-i64:64-f80:128-n8:16:32:64-S128'

Using Opt v0.2.2
nUnknowns =     307200
nResiduals =    0 + 307200 * 6

nnz =   0 + 307200 * 26

'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/util.t:873: cuModuleLoadData: cuda reported error 218: a PTX JIT compilation failed
stack traceback:
        [C]: in function 'error'
        [string "<string>"]:250: in function 'cudacompile'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/util.t:873: in function 'makeGPUFunctions'
        ...ents\git-task\Optlang\Opt\API\src/solverGPUGaussNewton.t:762: in function 'compilePlan'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:870: in function <C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:862>
        [C]: in function 'xpcall'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:862: in function <C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:861>
warning: Linking two modules of different data layouts: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0/nvvm/libdevice/libdevice.10.bc' is '' whereas 'external' is 'e-m:w-i64:64-f80:128-n8:16:32:64-S128'

I am using CUDA 10.0 on Windows 10 and building the example project shape from shading.

@ProfFan
Copy link
Author

ProfFan commented Apr 14, 2019

Windows 10 is not currently a supported platform for CUDA I think. Also you will need the latest Terra compiled from source.

@gerwang
Copy link

gerwang commented Apr 14, 2019

I see, I think if I use a CUDA version other than 7.5, I should compile terra from source. But CUDA 10.0 actually supports Windows 10.

@ProfFan
Copy link
Author

ProfFan commented Apr 14, 2019

s/for CUDA/for Terra CUDA support/g :)

@gerwang
Copy link

gerwang commented Apr 15, 2019

@ProfFan What version of LLVM are you using?
I am currently using LLVM 6.0.1 built from source on Windows 10 but still encountering the above errors.
I heard that LLVM supports CUDA 10 after version r342924.

@gerwang
Copy link

gerwang commented Apr 15, 2019

I followed the commit on https://marc.info/?l=llvm-commits&m=153783073315460&w=2 and add some enums to my LLVM 6.0.1 source code. Now it works, but this warning warning: Linking two modules of different data layouts: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0/nvvm/libdevice/libdevice.10.bc' is '' whereas 'external' is 'e-m:w-i64:64-f80:128-n8:16:32:64-S128' still exists.

@ProfFan
Copy link
Author

ProfFan commented Apr 15, 2019

The warning can be safely ignored.

@gerwang
Copy link

gerwang commented Apr 15, 2019

Please tell me your LLVM version @ProfFan, cause I am still encountering a strange problem with modified LLVM 6.0.1. The shape from shading example compiles and runs, but the OptGN method does not converge and final cost rises to 3000 (initial cost is 128), while OptLM method reverts every iteration.

@gerwang
Copy link

gerwang commented Apr 15, 2019

I think there are some problems with cuda's math library, maybe just adding new enums to LLVM cannot get it to produce right PTX (CUDA 10 requires PTX 6.3 while LLVM 6.0.1 still generates PTX 6.0).

@ProfFan
Copy link
Author

ProfFan commented Apr 15, 2019

Are you using the latest Terra compiled from source? Mine is CUDA 10 and LLVM 7.

LLVM 5 is super buggy itself and is not recommended even not for Terra.
LLVM 6 and 7 should be fine.

@ProfFan
Copy link
Author

ProfFan commented Apr 15, 2019

Also if you are referring to the SfS example, it does not work for me either.

@Mx7f
Copy link
Collaborator

Mx7f commented Apr 30, 2019

I wonder if the SfS example error is related to #136. I will be testing in the coming days.

@zhangfqjs
Copy link

But after modifying util.t, I encountered following error:

warning: Linking two modules of different data layouts: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0/nvvm/libdevice/libdevice.10.bc' is '' whereas 'external' is 'e-m:w-i64:64-f80:128-n8:16:32:64-S128'

Using Opt v0.2.2
nUnknowns =     307200
nResiduals =    0 + 307200 * 6

nnz =   0 + 307200 * 26

'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
'sm_75' is not a recognized processor for this target (ignoring processor)
C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/util.t:873: cuModuleLoadData: cuda reported error 218: a PTX JIT compilation failed
stack traceback:
        [C]: in function 'error'
        [string "<string>"]:250: in function 'cudacompile'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/util.t:873: in function 'makeGPUFunctions'
        ...ents\git-task\Optlang\Opt\API\src/solverGPUGaussNewton.t:762: in function 'compilePlan'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:870: in function <C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:862>
        [C]: in function 'xpcall'
        C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:862: in function <C:\Users\BBNC\Documents\git-task\Optlang\Opt\API\src/o.t:861>
warning: Linking two modules of different data layouts: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0/nvvm/libdevice/libdevice.10.bc' is '' whereas 'external' is 'e-m:w-i64:64-f80:128-n8:16:32:64-S128'

I am using CUDA 10.0 on Windows 10 and building the example project shape from shading.

I got the same error on win10 and CUDA 10.1, have you fixed it and how?

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

4 participants