Skip to content

CHIP-SPV Error 13: hipMemcpyToSymbol with templated __constant__ memory fails #977

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

Open
sbekele81 opened this issue Feb 27, 2025 · 0 comments

Comments

@sbekele81
Copy link

sbekele81 commented Feb 27, 2025

Description: hipMemcpyToSymbol fails when used with templated constant memory.

Steps to Reproduce:

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include
#include <hip/hip_runtime.h>

#define MAX_MASK_WIDTH 10

template
constant T mask [MAX_MASK_WIDTH];

template
void conv1D(const int repeat)
{
T h_mask[MAX_MASK_WIDTH];

hipMemcpyToSymbol(mask, h_mask, 3 * sizeof(T));

hipDeviceSynchronize();

}

int main(int argc, char* argv[]) {

conv1D(1);

return 0;
}

hipcc -o test test.cpp

./test

CHIP error [TID 23873] [1740692465.710937680] : Error 13 at CHIPBindings.cc:4343 code !Var

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

1 participant