forked from IntelPython/dpctl
-
Notifications
You must be signed in to change notification settings - Fork 0
change and fixes for existing funcs #6
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
Closed
1e-to
wants to merge
60
commits into
diptorupd:feature/extra_device_info
from
1e-to:extra_device_info
Closed
Changes from 4 commits
Commits
Show all changes
60 commits
Select commit
Hold shift + click to select a range
1de7ff4
Add support for uint8 and ulong.
ccb8d4c
A current device is always present even outside a device context.
3f92407
Allow program creation only for OpenCL for the time being.
530ae9f
Fix errors found for Sergey.
d6bcd74
Remove useless except+, as C++ exceptions do not cross C API.
4e6aabc
no need to use enum in return type
oleksandr-pavlyk 7629342
Fixed TBB warnings on setting GPU queue
oleksandr-pavlyk 772b97d
Rename DPPLSyclBEType to DPPLSyclBackendType. Drop superfluous enum s…
c4acc54
Merge branch 'feature/backend_specific_queues_v2' of github.com:dipto…
5d6ddc4
Reformat.
81dd13d
Fix formatting.
071a5fe
onaAPI beta10 compiler (#103)
PokhodenkoSA 7586726
onaAPI beta10 compiler (#103)
PokhodenkoSA 251f135
Merge pull request #93 from diptorupd/feature/backend_specific_queues_v2
diptorupd 35c4748
Add support for uint8 and ulong.
1e0db44
Merge branch 'fix/issue_83' of github.com:diptorupd/dpctl into fix/is…
f765236
Merge branch 'diptorupd-fix/issue_83' into upstream_master
7f7b090
Fix/issue 83 (#96)
diptorupd d10f0e3
Merge branch 'master' of github.com:IntelPython/dpctl into upstream_m…
451ca50
Feature/get ref address (#105)
diptorupd bb41bb6
Rename PyDPPL to dpCtl in all visible places (#104)
PokhodenkoSA aaa51d3
Fix bugs highlighted by tools (#92)
PokhodenkoSA e351cb2
Update README.md
PokhodenkoSA 9449986
Change cast from long to size_t (#111)
diptorupd 9e3d086
Add changelog (#108)
1e-to 438d620
Update CONTRIBUTING.md
diptorupd 59fab30
Use INSTALL_PATH in cmake call
oleksandr-pavlyk 38d9993
Merge pull request #114 from IntelPython/fix-windows-script
oleksandr-pavlyk 49042af
Update CHANGELOG.md
diptorupd 2e25253
Fixed typo in the code for set_default_queue (#117)
oleksandr-pavlyk 7c311f4
Use only first device for each device type and backend (#118)
PokhodenkoSA 9fcbaa5
Fix failing platform test case. (#116)
diptorupd e34ad68
Rename all pxd and pyx filenames to start with _
614acd4
change and fixes for existing funcs
f3582d9
Add device::aspects for int64_base_atomics and int64_extended_atomics
55a1c82
dpctl.get_current_queue is now cimportable
oleksandr-pavlyk e3c901d
Fixes according comments
19abe76
Fix tests
d114c8c
Use the black badge in project's README.md
PokhodenkoSA eb8afec
Add GitHub Actions for black
PokhodenkoSA 6efde3d
Ignore versioneer.py from black formatting
PokhodenkoSA 41ccd65
Format all Python code with black
PokhodenkoSA eadd8e5
Add ignoring revisions for blame
PokhodenkoSA c9ab60a
Update CONTRIBUTING.md
PokhodenkoSA 519312f
Merge pull request #91 from PokhodenkoSA/tools/black
PokhodenkoSA 6684c7b
Merge pull request #125 from IntelPython/expose-get-current-queue-on-…
oleksandr-pavlyk 7a4750a
merge master
e509c23
Codestyle
245cafc
Codestyle
1c151b9
Some fixes + add tests for level0 gpu
425d841
Merge branch 'upstream_master'
d19a63d
Change names in tests level0gpu
519b077
Add flags for fixing hardening-check (#149)
PokhodenkoSA d8e7104
Remove OpenCL interface (#138)
1e-to 8c4ffbb
Merge branch 'upstream_master'
7e5ceb3
merge master
6bd898d
Update changelog
7d548cd
fixed filename typo in setup.py to fix build
oleksandr-pavlyk a08c943
Merge branch 'master' into extra_device_info
PokhodenkoSA c26f332
Fix import _backend in _sycl_core.pxd
PokhodenkoSA 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| //===--- dppl_sycl_device_interface.cpp - DPPL-SYCL interface --*- C++ -*--===// | ||
| //===--- dppl_sycl_device_interface.cpp - dpctl-C_API interface --*- C++ -*--===// | ||
| // | ||
| // Python Data Parallel Processing Library (PyDPPL) | ||
| // | ||
|
|
@@ -104,17 +104,17 @@ void DPPLDevice_Delete (__dppl_take DPPLSyclDeviceRef DRef) | |
| bool DPPLDevice_IsAccelerator (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| return unwrap(DRef)->is_accelerator(); | ||
| if (D) { | ||
| return D->is_accelerator(); | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| bool DPPLDevice_IsCPU (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| return unwrap(DRef)->is_cpu(); | ||
| if (D) { | ||
| return D->is_cpu(); | ||
| } | ||
| return false; | ||
|
|
||
|
|
@@ -123,8 +123,8 @@ bool DPPLDevice_IsCPU (__dppl_keep const DPPLSyclDeviceRef DRef) | |
| bool DPPLDevice_IsGPU (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| return unwrap(DRef)->is_gpu(); | ||
| if (D) { | ||
| return D->is_gpu(); | ||
| } | ||
| return false; | ||
| } | ||
|
|
@@ -133,18 +133,18 @@ bool DPPLDevice_IsGPU (__dppl_keep const DPPLSyclDeviceRef DRef) | |
| bool DPPLDevice_IsHost (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| return unwrap(DRef)->is_host(); | ||
| if (D) { | ||
| return D->is_host(); | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
|
|
||
| uint32_t | ||
| DPPLDevice_GetMaxComputeUnites (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| DPPLDevice_GetMaxComputeUnits (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| return D->get_info<info::device::max_compute_units>(); | ||
| } | ||
| return 0; | ||
|
|
@@ -155,7 +155,7 @@ uint32_t | |
| DPPLDevice_GetMaxWorkItemDims (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| return D->get_info<info::device::max_work_item_dimensions>(); | ||
| } | ||
| return 0; | ||
|
|
@@ -166,7 +166,7 @@ DPPLDevice_GetMaxWorkItemSizes (__dppl_keep const DPPLSyclDeviceRef DRef) | |
| { | ||
| size_t *sizes = nullptr; | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| auto id_sizes = D->get_info<info::device::max_work_item_sizes>(); | ||
| sizes = new size_t[3]; | ||
| for(auto i = 0ul; i < 3; ++i) { | ||
|
|
@@ -180,7 +180,7 @@ size_t | |
| DPPLDevice_GetMaxWorkGroupSize (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| return D->get_info<info::device::max_work_group_size>(); | ||
| } | ||
| return 0; | ||
|
|
@@ -190,18 +190,38 @@ uint32_t | |
| DPPLDevice_GetMaxNumSubGroups (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| return D->get_info<info::device::max_num_sub_groups>(); | ||
| } | ||
| return 0; | ||
| } | ||
|
|
||
| bool | ||
| DPPLDevice_HasInt64BaseAtomics (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if (D) { | ||
| return D->has(aspect::int64_base_atomics); | ||
|
Owner
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. I did not know about the functions. Nice! |
||
| } | ||
| return false; | ||
| } | ||
|
|
||
| bool | ||
| DPPLDevice_HasInt64ExtendedAtomics (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if (D) { | ||
| return D->has(aspect::int64_extended_atomics); | ||
| } | ||
| return false; | ||
| } | ||
|
|
||
| __dppl_give const char* | ||
| DPPLDevice_GetName (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| auto name = unwrap(DRef)->get_info<info::device::name>(); | ||
| if (D) { | ||
| auto name = D->get_info<info::device::name>(); | ||
| auto cstr_name = new char [name.length()+1]; | ||
| std::strcpy (cstr_name, name.c_str()); | ||
| return cstr_name; | ||
|
|
@@ -213,8 +233,8 @@ __dppl_give const char* | |
| DPPLDevice_GetVendorName (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| auto vendor = unwrap(DRef)->get_info<info::device::name>(); | ||
| if (D) { | ||
| auto vendor = D->get_info<info::device::name>(); | ||
| auto cstr_vendor = new char [vendor.length()+1]; | ||
| std::strcpy (cstr_vendor, vendor.c_str()); | ||
| return cstr_vendor; | ||
|
|
@@ -226,8 +246,8 @@ __dppl_give const char* | |
| DPPLDevice_GetDriverInfo (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| auto driver = unwrap(DRef)->get_info<info::device::driver_version>(); | ||
| if (D) { | ||
| auto driver = D->get_info<info::device::driver_version>(); | ||
| auto cstr_driver = new char [driver.length()+1]; | ||
| std::strcpy (cstr_driver, driver.c_str()); | ||
| return cstr_driver; | ||
|
|
@@ -238,7 +258,7 @@ DPPLDevice_GetDriverInfo (__dppl_keep const DPPLSyclDeviceRef DRef) | |
| bool DPPLDevice_IsHostUnifiedMemory (__dppl_keep const DPPLSyclDeviceRef DRef) | ||
| { | ||
| auto D = unwrap(DRef); | ||
| if(D) { | ||
| if (D) { | ||
| return D->get_info<info::device::host_unified_memory>(); | ||
| } | ||
| return false; | ||
|
|
||
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
Oops, something went wrong.
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.
It is very dangerous to rename API function. It is better to create a new one with new name and implement the old one via the new one.
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.
Then mark it as deprecated. Better to print warning in stderr when old function is used.
And remove in the next release.