-
Notifications
You must be signed in to change notification settings - Fork 797
[UR] Stop querying adapter fp16/fp64 support via extension. #15811
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
Open
aarongreig
wants to merge
23
commits into
intel:sycl
Choose a base branch
from
aarongreig:aaron/stopReportingFPExtensions
base: sycl
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
32957aa
[UR] Stop querying adapter fp16/fp64 support via extension.
aarongreig 5e66ecc
Simplify device info helpers
aarongreig 8720fbe
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig 368a9e8
Rely on empty bitfield to report no type support
aarongreig d789703
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig 5358def
Revert change made for testing.
aarongreig b3b7153
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig fba0498
Clean up some remaining uses of the old extension string.
aarongreig 3049632
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig ee0fc6c
Fix unit tests.
aarongreig 189bf35
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig 62803c0
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig 3e22484
Report device fp support via config rather than extension string.
aarongreig 461ca20
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig f3ab64a
Fix formatting.
aarongreig 8b55b79
Fix another bad conflict resolution.
aarongreig e965b3e
Adjust minimum flags in native cpu and link related issue.
aarongreig 9ecf00b
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig 3f13197
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig f5bcab7
Fix hip build.
aarongreig 797dd4c
Fix unit tests and report proper vec widths for hip + cuda.
aarongreig b9017b9
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig a9932cc
Merge branch 'sycl' into aaron/stopReportingFPExtensions
aarongreig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1236,8 +1236,8 @@ class device_impl : public std::enable_shared_from_this<device_impl> { | |
} | ||
CASE(emulated) { return false; } | ||
CASE(host_debuggable) { return false; } | ||
CASE(fp16) { return has_extension("cl_khr_fp16"); } | ||
CASE(fp64) { return has_extension("cl_khr_fp64"); } | ||
CASE(fp16) { return isFp16Supported(); } | ||
CASE(fp64) { return isFp64Supported(); } | ||
CASE(int64_base_atomics) { | ||
return has_extension("cl_khr_int64_base_atomics"); | ||
} | ||
|
@@ -2251,6 +2251,12 @@ class device_impl : public std::enable_shared_from_this<device_impl> { | |
return {}; | ||
} | ||
|
||
// Check if the device supports double precision floating point. | ||
bool isFp64Supported() const; | ||
|
||
// Check if the device supports half precision floating point. | ||
bool isFp16Supported() const; | ||
|
||
Comment on lines
+2254
to
+2259
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please don't add extra methods. Existing interfaces should be enough, just change their implementation to the proper calls to the underlying UR queries. |
||
private: | ||
ur_device_handle_t MDevice = 0; | ||
// This is used for getAdapter so should be above other properties. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relied on the internal caching of the extensions string, we need to ensure that new underlying query is cached too. See
llvm/sycl/source/detail/device_impl.hpp
Lines 2265 to 2301 in 76a887e