kunzmi / ImageStackAlignator

Implementation of Google's Handheld Multi-Frame Super-Resolution algorithm (from Pixel 3 and Pixel 4 camera)
GNU General Public License v3.0
399 stars 66 forks source link

a PTX JIT compilation failed #10

Open aci7mio opened 4 years ago

aci7mio commented 4 years ago

Hello, I am a beginner of CUDA. I downloaded your code and tried to run it, but I met some problems.

My laptop environment is VS2017(professional)+ GTX960M+CUDA10.0+DirectX12.

When I start the “TestGoogleSuperRes.sln” file, it reported an error " ManagedCuda.CudaException:“ErrorInvalidPtx: This indicates that a PTX JIT compilation failed.” (located at “CUmodule modDebayer = _ctx.LoadModulePTX("DeBayerKernels.ptx");“) . CTX cannot be evaluated correctly.

Then I tried to debug each project. When I started a new instance on the ‘Kernels“ project alone, I got an error “fail to find the file Kernels in PEFStudioDX”. Is this matter? And is the ”PTX JIT compilation failed“ related to this situation?

I would be grateful if you could let me know what caused the above two situations and help me to solve them..

Best wishes.

“System.IO.FileNotFoundException”( ManagedCuda.dll ) “ManagedCuda.CudaException”(ManagedCuda.dll ) ErrorInvalidPtx: This indicates that a PTX JIT compilation failed.

kunzmi commented 4 years ago

This indicates that the cuda kernels stored in ptx files can't be found. Make sure that these files are in the same directory as the executable and that the working directory is the one where the application is.

aci7mio commented 4 years ago

Thanks for your answer. When I regenerated the PTX files under release and went back to debug to try to run it, the exception “ System.IO.FileNotFoundException”(ManagedCuda.dll)was still prompted. However, the program did not interrupt as before. At this point I could choose the images in the interactive window, but when I tried to the calculate the reference image, it showed "'ManagedCuda. CudaFFT. CudaFFTException' is unhandled in CudaFFT. DLL" and "AllocFailed: CUFFT failed to allocate GPU memory." In fact, my computer is equipped with 8G of video memory, so it is unlikely to run out of space. Is this error still a problem of not finding a suitable PTX file? In addition, I found that the package ManagedCuda in the project is labeled 10.0.31, while my CUDA version is 10.0.1. Is it related to the error I encountered?

aci7mio commented 4 years ago

A new error has appeared when I tried again: “System.IO.FileNotFoundException”(ManagedCuda.dll ) “ManagedCuda.CudaException”( ManagedCuda.dll ) ErrorInvalidHandle: This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like CUstream and CUevent.