Skip to content

Commit

Permalink
pygpu: Don't change addres space when casting pointer.
Browse files Browse the repository at this point in the history
Fixes pygpu.tests.test_basic.test_triu and
pygpu.tests.test_basic.test_tril on amdgpu/clover

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
  • Loading branch information
jvesely committed Sep 18, 2017
1 parent 2e73170 commit 9954502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pygpu/basic.py
Expand Up @@ -6,7 +6,7 @@ def _generate_kernel(ctx, cols, upper=True):
tmpl = Template("""
#include "cluda.h"
KERNEL void extract_tri(GLOBAL_MEM ga_float *a, ga_size a_off, ga_uint N) {
a = (GLOBAL_MEM ga_float *)(((char *)a) + a_off);
a = (GLOBAL_MEM ga_float *)(((GLOBAL_MEM char *)a) + a_off);
unsigned int idx = GID_1 * LDIM_0 * GDIM_0 +
GID_0 * LDIM_0 + LID_0;
unsigned int ix = idx/${cols};
Expand Down

0 comments on commit 9954502

Please sign in to comment.