Skip to content

Add device descriptors: sub_group_independent_forward_progress and preferred_vector_width - #308

Merged
diptorupd merged 9 commits into
IntelPython:masterfrom
1e-to:device_descriptor
Mar 25, 2021
Merged

diptorupd merged 9 commits into
IntelPython:masterfrom
1e-to:device_descriptor

Conversation

@1e-to

@1e-to 1e-to commented Mar 2, 2021 •

Copy link
Copy Markdown
Contributor

Add sub_group_independent_forward_progress and preferred_vector_width_char
Closes #314 , the part of #286

@1e-to 1e-to linked an issue Mar 10, 2021 that may be closed by this pull request
8 tasks done
@1e-to

1e-to commented Mar 10, 2021

Copy link
Copy Markdown
Contributor Author

@diptorupd, @oleksandr-pavlyk could you please take a look?

@1e-to 1e-to changed the title Device descriptor Add device descriptors: sub_group_independent_forward_progress and preferred_vector_width Mar 10, 2021
@diptorupd

Copy link
Copy Markdown
Contributor

@1e-to Looks good. @oleksandr-pavlyk once we have the types properly supported we should have a single get_vector_width call and pass in a dtype to lookup.

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

Can I suggest to not save properties in SyclDevice instance? The get_info call is not expensive, and Python property should just be making it. It is cleaner, I think.

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

For now this looks good. Feel free to merge. This will cause conflicts with feature/queue_manager_v2 but I can resolve them.

@diptorupd

diptorupd commented Mar 13, 2021 •

Copy link
Copy Markdown
Contributor

Can I suggest to not save properties in SyclDevice instance? The get_info call is not expensive, and Python property should just be making it. It is cleaner, I think.

I think it is better to make the change now before we add even more get_info wrappers. @1e-to please change these new attributes into properties.

I have created a PR #324 to change the existing attributes to properties.

Let us keep these attributes as is, since they involve allocating a pointer:

  • cdef const char *_vendor_name
  • cdef const char *_device_name
  • cdef const char *_driver_version
  • cdef size_t *_max_work_item_sizes

Also, rebase with master, as I have merged @oleksandr-pavlyk 's changes to SyclDevice in #321.

@diptorupd diptorupd mentioned this pull request Mar 15, 2021
8 tasks done
@diptorupd

Copy link
Copy Markdown
Contributor

@1e-to can you rebase this with master and then change the attributes you added to SyclDevice class to properties.

GTEST_SKIP_("Device not found");
EXPECT_NO_FATAL_FAILURE(
vector_width_double = DPCTLDevice_GetPreferredVectorWidthDouble(DRef));
if (DPCTLDevice_HasAspect(DRef, DPCTL_SyclAspectToDPCTLAspectType(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! You have been reading the spec a lot :)

@diptorupd diptorupd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks really good. Thanks!

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @1e-to !

@diptorupd
diptorupd merged commit 75aa0c1 into IntelPython:master Mar 25, 2021
diptorupd pushed a commit that referenced this pull request Apr 2, 2021
…eferred_vector_width (#308)

* Add sub_group_independent_forward_progress and preferred_vector_width_char

* Add tests

* Add python api

* Fixes + tests

* Add preferred_vector_width funcs

* Added property

Co-authored-by: etotmeni <elena.totmenina@intel.com>
@1e-to
1e-to deleted the device_descriptor branch November 3, 2021 09:58
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.

Add device descriptors: sub_group_independent_forward_progress and preferred_vector_width

4 participants