-
Notifications
You must be signed in to change notification settings - Fork 29
Feature/extra device info #115
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
Conversation
These descriptors return std::vector, further research is needed to select an implementation |
Continued work here diptorupd#6 |
return unwrap(DRef)->is_gpu(); | ||
auto D = unwrap(DRef); | ||
if(D) { | ||
return unwrap(DRef)->is_gpu(); |
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.
Use D
.
void DPPLSize_t_Array_Delete (__dppl_take size_t* arr) | ||
{ | ||
delete[] arr; | ||
} |
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.
} | |
} | |
::testing::InitGoogleTest(&argc, argv); | ||
int ret = RUN_ALL_TESTS(); | ||
return ret; | ||
} |
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.
} | |
} | |
* @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. |
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.
* @return Returns the valid result if device exists else returns Null. | |
* @return Returns the valid result if device exists else returns NULL. |
return cstr_name; | ||
auto D = unwrap(DRef); | ||
if(D) { | ||
auto name = unwrap(DRef)->get_info<info::device::name>(); |
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.
Use D
.
return cstr_vendor; | ||
auto D = unwrap(DRef); | ||
if(D) { | ||
auto vendor = unwrap(DRef)->get_info<info::device::name>(); |
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.
Use D
.
std::strcpy (cstr_driver, driver.c_str()); | ||
return cstr_driver; | ||
auto D = unwrap(DRef); | ||
if(D) { |
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.
if(D) { | |
if (D) { |
@@ -0,0 +1,230 @@ | |||
//===----- test_sycl_device_interface.cpp - DPPL-SYCL interface -*- C++ -*-===// |
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.
//===----- test_sycl_device_interface.cpp - DPPL-SYCL interface -*- C++ -*-===// | |
//===----- test_sycl_device_interface.cpp - dpctl-C_API interface -*- C++ -*-===// |
Change it in all changed files to be like in other existing files in backend.
/// | ||
/// \file | ||
/// This file has unit test cases for functions defined in | ||
/// dppl_sycl_kernel_interface.h. |
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.
Update the comment.
Closing in favor of #147 |
The PR closes issues #113 and #81.
Sycl
device
class provides several info device descriptors that can be extracted usinginfo::device
. This PR will expose several of the device descriptors inside dpctl C API (backends) and inside the dpctl.SyclDevice class.These attributes are needed inside Numba and possibly by other clients of dpctl to determine device capabilities.