Skip to content

Conversation

@waynemitchell
Copy link
Contributor

Add umpire support for the sycl backend.

Comment on lines 1731 to 1738
#if defined(HYPRE_USING_SYCL)
HYPRE_Int device_id;
hypre_GetDevice(&device_id);
hypre_sprintf(resource_name, "%s::%d", "DEVICE", device_id);
#else
const hypre_int device_id = hypre_HandleDevice(handle);
hypre_sprintf(resource_name, "%s::%d", "DEVICE", device_id);
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor reorg:

Suggested change
#if defined(HYPRE_USING_SYCL)
HYPRE_Int device_id;
hypre_GetDevice(&device_id);
hypre_sprintf(resource_name, "%s::%d", "DEVICE", device_id);
#else
const hypre_int device_id = hypre_HandleDevice(handle);
hypre_sprintf(resource_name, "%s::%d", "DEVICE", device_id);
#endif
#if defined(HYPRE_USING_SYCL)
HYPRE_Int device_id;
hypre_GetDevice(&device_id);
#else
const hypre_int device_id = hypre_HandleDevice(handle);
#endif
hypre_sprintf(resource_name, "%s::%d", "DEVICE", device_id);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, just curious... Shouldn't hypre_HandleDevice(handle); work for SYCL as well? Curious why we need to do something different for SYCL...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of hypre_HandleDevice(handle) is different for sycl. It's an actual sycl device object rather than just an integer ID.

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

Successfully merging this pull request may close these issues.

3 participants