Skip to content
Closed
Show file tree
Hide file tree
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.
Oct 4, 2020
ccb8d4c
A current device is always present even outside a device context.
Oct 4, 2020
3f92407
Allow program creation only for OpenCL for the time being.
Oct 4, 2020
530ae9f
Fix errors found for Sergey.
Oct 4, 2020
d6bcd74
Remove useless except+, as C++ exceptions do not cross C API.
Oct 4, 2020
4e6aabc
no need to use enum in return type
oleksandr-pavlyk Oct 5, 2020
7629342
Fixed TBB warnings on setting GPU queue
oleksandr-pavlyk Oct 5, 2020
772b97d
Rename DPPLSyclBEType to DPPLSyclBackendType. Drop superfluous enum s…
Oct 5, 2020
c4acc54
Merge branch 'feature/backend_specific_queues_v2' of github.com:dipto…
Oct 5, 2020
5d6ddc4
Reformat.
Oct 5, 2020
81dd13d
Fix formatting.
Oct 5, 2020
071a5fe
onaAPI beta10 compiler (#103)
PokhodenkoSA Oct 5, 2020
7586726
onaAPI beta10 compiler (#103)
PokhodenkoSA Oct 5, 2020
251f135
Merge pull request #93 from diptorupd/feature/backend_specific_queues_v2
diptorupd Oct 5, 2020
35c4748
Add support for uint8 and ulong.
Oct 4, 2020
1e0db44
Merge branch 'fix/issue_83' of github.com:diptorupd/dpctl into fix/is…
Oct 5, 2020
f765236
Merge branch 'diptorupd-fix/issue_83' into upstream_master
Oct 5, 2020
7f7b090
Fix/issue 83 (#96)
diptorupd Oct 5, 2020
d10f0e3
Merge branch 'master' of github.com:IntelPython/dpctl into upstream_m…
Oct 5, 2020
451ca50
Feature/get ref address (#105)
diptorupd Oct 6, 2020
bb41bb6
Rename PyDPPL to dpCtl in all visible places (#104)
PokhodenkoSA Oct 6, 2020
aaa51d3
Fix bugs highlighted by tools (#92)
PokhodenkoSA Oct 6, 2020
e351cb2
Update README.md
PokhodenkoSA Oct 6, 2020
9449986
Change cast from long to size_t (#111)
diptorupd Oct 6, 2020
9e3d086
Add changelog (#108)
1e-to Oct 6, 2020
438d620
Update CONTRIBUTING.md
diptorupd Oct 6, 2020
59fab30
Use INSTALL_PATH in cmake call
oleksandr-pavlyk Oct 6, 2020
38d9993
Merge pull request #114 from IntelPython/fix-windows-script
oleksandr-pavlyk Oct 6, 2020
49042af
Update CHANGELOG.md
diptorupd Oct 6, 2020
2e25253
Fixed typo in the code for set_default_queue (#117)
oleksandr-pavlyk Oct 8, 2020
7c311f4
Use only first device for each device type and backend (#118)
PokhodenkoSA Oct 8, 2020
9fcbaa5
Fix failing platform test case. (#116)
diptorupd Oct 8, 2020
e34ad68
Rename all pxd and pyx filenames to start with _
Oct 9, 2020
614acd4
change and fixes for existing funcs
Oct 12, 2020
f3582d9
Add device::aspects for int64_base_atomics and int64_extended_atomics
Oct 13, 2020
55a1c82
dpctl.get_current_queue is now cimportable
oleksandr-pavlyk Oct 13, 2020
e3c901d
Fixes according comments
Oct 14, 2020
19abe76
Fix tests
Oct 14, 2020
d114c8c
Use the black badge in project's README.md
PokhodenkoSA Oct 3, 2020
eb8afec
Add GitHub Actions for black
PokhodenkoSA Oct 15, 2020
6efde3d
Ignore versioneer.py from black formatting
PokhodenkoSA Oct 15, 2020
41ccd65
Format all Python code with black
PokhodenkoSA Oct 15, 2020
eadd8e5
Add ignoring revisions for blame
PokhodenkoSA Oct 15, 2020
c9ab60a
Update CONTRIBUTING.md
PokhodenkoSA Oct 15, 2020
519312f
Merge pull request #91 from PokhodenkoSA/tools/black
PokhodenkoSA Oct 15, 2020
6684c7b
Merge pull request #125 from IntelPython/expose-get-current-queue-on-…
oleksandr-pavlyk Oct 15, 2020
7a4750a
merge master
Oct 19, 2020
e509c23
Codestyle
Oct 19, 2020
245cafc
Codestyle
Oct 19, 2020
1c151b9
Some fixes + add tests for level0 gpu
Oct 21, 2020
425d841
Merge branch 'upstream_master'
Oct 21, 2020
d19a63d
Change names in tests level0gpu
Oct 22, 2020
519b077
Add flags for fixing hardening-check (#149)
PokhodenkoSA Oct 22, 2020
d8e7104
Remove OpenCL interface (#138)
1e-to Oct 23, 2020
8c4ffbb
Merge branch 'upstream_master'
Oct 23, 2020
7e5ceb3
merge master
Oct 23, 2020
6bd898d
Update changelog
Oct 23, 2020
7d548cd
fixed filename typo in setup.py to fix build
oleksandr-pavlyk Oct 23, 2020
a08c943
Merge branch 'master' into extra_device_info
PokhodenkoSA Oct 23, 2020
c26f332
Fix import _backend in _sycl_core.pxd
PokhodenkoSA Oct 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions backends/include/dppl_sycl_device_interface.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--- dppl_sycl_device_interface.h - DPPL-SYCL interface ---*---C++ -*---===//
//===--- dppl_sycl_device_interface.h - dpctl-C_API interface ---*---C++ -*---===//
//
// Python Data Parallel Processing Library (PyDPPL)
//
Expand Down Expand Up @@ -110,10 +110,10 @@ DPPLDevice_GetDriverInfo (__dppl_keep const DPPLSyclDeviceRef DRef);
*/
DPPL_API
uint32_t
DPPLDevice_GetMaxComputeUnites (__dppl_keep const DPPLSyclDeviceRef DRef);
DPPLDevice_GetMaxComputeUnits (__dppl_keep const DPPLSyclDeviceRef DRef);

Copy link
Copy Markdown

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.

Copy link
Copy Markdown

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.


/*!
* @brief Wrapper for get_info<info::device::max_work_item_dimensions().
* @brief Wrapper for get_info<info::device::max_work_item_dimensions>().
*
* @param DRef Opaque pointer to a sycl::device
* @return Returns the valid result if device exists else returns 0.
Expand All @@ -123,17 +123,17 @@ uint32_t
DPPLDevice_GetMaxWorkItemDims (__dppl_keep const DPPLSyclDeviceRef DRef);

/*!
* @brief Wrapper for get_info<info::device::max_work_item_sizes().
* @brief Wrapper for get_info<info::device::max_work_item_sizes>().
*
* @param DRef Opaque pointer to a sycl::device
* @return Returns the valid result if device exists else returns Null.
* @return Returns the valid result if device exists else returns NULL.
*/
DPPL_API
__dppl_keep size_t*
DPPLDevice_GetMaxWorkItemSizes (__dppl_keep const DPPLSyclDeviceRef DRef);

/*!
* @brief Wrapper for get_info<info::device::max_work_group_size().
* @brief Wrapper for get_info<info::device::max_work_group_size>().
*
* @param DRef Opaque pointer to a sycl::device
* @return Returns the valid result if device exists else returns 0.
Expand All @@ -152,6 +152,26 @@ DPPL_API
uint32_t
DPPLDevice_GetMaxNumSubGroups (__dppl_keep const DPPLSyclDeviceRef DRef);

/*!
* @brief Wrapper over device.get_info<info::device::aspect::int64_base_atomics>.
*
* @param DRef Opaque pointer to a sycl::device
* @return Returns true if device has int64_base_atomics else returns false.
*/
DPPL_API
bool
DPPLDevice_HasInt64BaseAtomics (__dppl_keep const DPPLSyclDeviceRef DRef);

/*!
* @brief Wrapper over device.get_info<info::device::aspect::int64_extended_atomics>.
*
* @param DRef Opaque pointer to a sycl::device
* @return Returns true if device has int64_extended_atomics else returns false.
*/
DPPL_API
bool
DPPLDevice_HasInt64ExtendedAtomics (__dppl_keep const DPPLSyclDeviceRef DRef);

/*!
* @brief Returns a C string for the device name.
*
Expand Down
64 changes: 42 additions & 22 deletions backends/source/dppl_sycl_device_interface.cpp
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)
//
Expand Down Expand Up @@ -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;

Expand All @@ -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;
}
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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) {
Expand All @@ -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;
Expand All @@ -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);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The 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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions backends/source/dppl_utils.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===--------- dppl_utils.cpp - DPPL-SYCL interface ----*---- C++ ----*----===//
//===--------- dppl_utils.cpp - dpctl-C_API interface ----*---- C++ ----*----===//
//
// Python Data Parallel Processing Library (PyDPPL)
//
Expand Down Expand Up @@ -33,4 +33,4 @@ void DPPLCString_Delete (__dppl_take const char* str)
void DPPLSize_t_Array_Delete (__dppl_take size_t* arr)
{
delete[] arr;
}
}
Loading