Skip to content

[SYCL] Implement proper queries for aspect::ext_oneapi_srgb #9243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 28, 2023

Conversation

aelovikov-intel
Copy link
Contributor

Plugins that don't support functionality must report false, not PI_INVALD_VALUE.

Plugins that don't support functionality must report false, not
PI_INVALD_VALUE.
@aelovikov-intel aelovikov-intel requested review from a team as code owners April 27, 2023 22:50
@aelovikov-intel aelovikov-intel temporarily deployed to aws April 27, 2023 23:22 — with GitHub Actions Inactive
@@ -44,6 +44,7 @@ const int UR_EXT_DEVICE_INFO_FREE_MEMORY = UR_EXT_DEVICE_INFO_END - 13;
// const int ZER_EXT_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE =
// UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE;
const int UR_EXT_DEVICE_INFO_MEM_CHANNEL_SUPPORT = UR_EXT_DEVICE_INFO_END - 15;
const int UR_EXT_DEVICE_INFO_IMAGE_SRGB = UR_EXT_DEVICE_INFO_END - 16;
Copy link
Contributor

Choose a reason for hiding this comment

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

@kbenzie: please take it into UR

Copy link
Contributor

Choose a reason for hiding this comment

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

We alreayd have UR_DEVICE_INFO_IMAGE_SRGB in ur_device_info_t. I think that should be sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Having checked out this branch I can see UR_DEVICE_INFO_IMAGE_SRGB is defined in the ur_api.h header and should be used instead of this new symbol.

@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 00:16 — with GitHub Actions Inactive
@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 01:19 — with GitHub Actions Inactive
@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 04:15 — with GitHub Actions Inactive
@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 05:09 — with GitHub Actions Inactive
Copy link
Contributor

@jchlanda jchlanda left a comment

Choose a reason for hiding this comment

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

CUDA/HIP LGTM

@@ -2105,6 +2105,11 @@ pi_result cuda_piDeviceGetInfo(pi_device device, pi_device_info param_name,
return getInfo<pi_bool>(param_value_size, param_value, param_value_size_ret,
false);
}
case PI_DEVICE_INFO_IMAGE_SRGB: {
// The sRGB images are not supported on HIP device.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
// The sRGB images are not supported on HIP device.
// The sRGB images are not supported on CUDA.

// UNSUPPORTED: cuda
// UNSUPPORTED: hip
// Only opencl plugin has implemented the supoort.
// REQUIRES: opencl
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that the aspect check works, should we maybe just do the check and an early exit instead? In the future we would that to a REQUIRES: aspect_image && aspect_ext_oneapi_srgb or something to that effect.

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 purpose of this test is FileCheck which we can't nicely implement without dynamic LIT features support.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see. Good point. Should we have a TODO just to remind us?

@@ -44,6 +44,7 @@ const int UR_EXT_DEVICE_INFO_FREE_MEMORY = UR_EXT_DEVICE_INFO_END - 13;
// const int ZER_EXT_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE =
// UR_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE;
const int UR_EXT_DEVICE_INFO_MEM_CHANNEL_SUPPORT = UR_EXT_DEVICE_INFO_END - 15;
const int UR_EXT_DEVICE_INFO_IMAGE_SRGB = UR_EXT_DEVICE_INFO_END - 16;
Copy link
Contributor

Choose a reason for hiding this comment

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

Having checked out this branch I can see UR_DEVICE_INFO_IMAGE_SRGB is defined in the ur_api.h header and should be used instead of this new symbol.

@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 14:02 — with GitHub Actions Inactive
@aelovikov-intel aelovikov-intel temporarily deployed to aws April 28, 2023 15:05 — with GitHub Actions Inactive
@v-klochkov v-klochkov merged commit 23978b4 into intel:sycl Apr 28, 2023
@aelovikov-intel aelovikov-intel deleted the aspect_srgb branch May 1, 2023 16:13
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 3, 2023
intel#9243

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 16, 2023
intel#9243

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 23, 2023
intel#9243

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
jandres742 pushed a commit to jandres742/llvm that referenced this pull request May 26, 2023
intel#9243

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
veselypeta pushed a commit to veselypeta/llvm that referenced this pull request Sep 21, 2023
Plugins that don't support functionality must report false, not
PI_INVALD_VALUE.
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.

6 participants