Re: [PATCH 08/13] Fix host-to-device copies from rodata for AMD GCN

2019-11-18 Thread Andrew Stubbs
On 15/11/2019 21:44, Julian Brown wrote: +static void +hsa_memory_copy_wrapper (void *dst, const void *src, size_t len) +{ + hsa_status_t status = hsa_fns.hsa_memory_copy_fn (dst, src, len); + + if (status == HSA_STATUS_SUCCESS) +return; + + /* It appears that the copy fails if the source

[PATCH 08/13] Fix host-to-device copies from rodata for AMD GCN

2019-11-15 Thread Julian Brown
It appears that the hsa_memory_copy API routine has problems copying from read-only data: in the libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-8.c test, a "const" variable cannot be successfully copied to the target. I think the problem is with read-only page mappings (in the HSA runtime).