Skip to content

runtime error "invalid device symbol" at CUDAConvolution.cu(100), cudaMemcpyToSymbol func call #4

@zhangxaochen

Description

@zhangxaochen

at CUDAConvolution.cu, Line 100, this code:
perseusSafeCall(cudaMemcpyToSymbol(dKernelConvolution, cudaData->hKernelConvolution, KERNEL_SIZE));
throws an error at runtime:

==[APP] Init Target ROI ==
E:/Github/PWP3D/PerseusLib/CUDA/CUDAConvolution.cu(100) : cudaSafeCall() Runtime API error : invalid device symbol.

the var/symbol is defined previously as:

__device__ __constant__ float dKernelConvolution[KERNEL_WIDTH];
const int KERNEL_SIZE = KERNEL_WIDTH * sizeof(float);

My environment in windows10, vs2013, gtx750ti (maxwell arch), cuda6.5, and I don't find a solution because:

  1. in cudaMemcpyToSymbol indeed dKernelConvolution is used, not the string varname "dKernelConvolution";
  2. the var dKernelConvolution is defined as __device__ __constant, also should be correct.

so is there anyone who has the same issue as mine?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions