StanfordLegion/legion

Realm: HIP implementation of multi-affine accessor

Closed this issue · 4 comments

As agreed during the Legion meeting, I am opening this issue to keep track of what is needed to make multi-affine accessors compatible with HIP.

@elliottslaughter, can you please add this issue to #1032?

Adding @pmccormick for visibility

This is related to #1476. We will need UVA support from HIP.

@eddy16112 asked me to run some tests:

ROCm 5.4.3:

$ ./test_hip_host 
host 0x7fc46f3e4010 dev 0x7fc351200010 equal? 0

ROCm 5.5.1:

$ ./test_hip_host 
host 0x7fbcabe0a010 dev 0x7fbc8da00010 equal? 0

ROCm 5.6.0:

$ ./test_hip_host 
host 0x7f392194d010 dev 0x7f392194d010 equal? 1

ROCm 5.7.1:

$ ./test_hip_host 
host 0x7f7f9be06010 dev 0x7f7f9be06010 equal? 1

ROCm 6.0.0:

$ ./test_hip_host 
host 0x7fa335b8b010 dev 0x7fa335b8b010 equal? 1

test_hip_host.cc:

#include <hip/hip_runtime.h>

#include <cassert>

int main() {
  size_t bytes = 1024 * 1024;
  void *host_buf = malloc(bytes);
  assert(host_buf);

  hipError_t ok = hipHostRegister(host_buf, bytes, hipHostRegisterDefault);
  assert(ok == HIP_SUCCESS);

  void *dev_ptr = NULL;
  ok = hipHostGetDevicePointer(&dev_ptr, host_buf, 0);
  assert(ok == HIP_SUCCESS);

  printf("host %p dev %p equal? %d\n", host_buf, dev_ptr, host_buf == dev_ptr);
}

Works with me. Thanks for fixing this issue