Skip to content

Commit 9954502

Browse files
committed
pygpu: Don't change addres space when casting pointer.
Fixes pygpu.tests.test_basic.test_triu and pygpu.tests.test_basic.test_tril on amdgpu/clover Signed-off-by: Jan Vesely <[email protected]>
1 parent 2e73170 commit 9954502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygpu/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def _generate_kernel(ctx, cols, upper=True):
66
tmpl = Template("""
77
#include "cluda.h"
88
KERNEL void extract_tri(GLOBAL_MEM ga_float *a, ga_size a_off, ga_uint N) {
9-
a = (GLOBAL_MEM ga_float *)(((char *)a) + a_off);
9+
a = (GLOBAL_MEM ga_float *)(((GLOBAL_MEM char *)a) + a_off);
1010
unsigned int idx = GID_1 * LDIM_0 * GDIM_0 +
1111
GID_0 * LDIM_0 + LID_0;
1212
unsigned int ix = idx/${cols};

0 commit comments

Comments
 (0)