Add missing device info queries#2324
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2324/index.html |
| "backend_type", | ||
| "event_status_type", | ||
| "global_mem_cache_type", | ||
| "local_mem_type", |
There was a problem hiding this comment.
Missed to update docs/doc_sources/api_reference/dpctl/constants.rst
| if arr is not NULL and arr_len > 0: | ||
| res = [] | ||
| for i in range(arr_len): | ||
| res.append(partition_property(arr[i] + 1)) |
There was a problem hiding this comment.
Do we need to guard against possible -1 value which dpctl_partition_property_to_int can return?
| EXPECT_TRUE(len > 0); | ||
| EXPECT_TRUE(arr != nullptr); | ||
| if (arr) | ||
| delete[] arr; |
There was a problem hiding this comment.
Do we need to use DPCTLInt_Array_Delete(arr) instead?
| * @param DRef Opaque pointer to a ``sycl::device`` | ||
| * @param res_len Populated with size of the returned array | ||
| * @return Returns an array of DPCTLFPConfigType values. Caller must free | ||
| * with DPCTLSize_t_Array_Delete. |
There was a problem hiding this comment.
| * with DPCTLSize_t_Array_Delete. | |
| * with DPCTLInt_Array_Delete. |
There was a problem hiding this comment.
We have a memory release instruction here, but not for DPCTLDevice_GetSingleFPConfig. Is that intentional?
And probably this is applicable to some other docstrings as well.
| { | ||
| int *arr = nullptr; | ||
| size_t len = 0; | ||
| EXPECT_NO_FATAL_FAILURE(arr = DPCTLDevice_GetSingleFPConfig(DRef, &len)); |
There was a problem hiding this comment.
There are 7 new functions which are not testing:
- GetImageMaxBufferSize
- GetHalfFPConfig
- GetDoubleFPConfig
- GetAtomicFenceOrderCapabilities
- GetAtomicFenceScopeCapabilities
- GetPartitionAffinityDomains
- GetPartitionTypeAffinityDomain
There was a problem hiding this comment.
Also none of 22 new API has null-DRe tests, like above ChkCopy
This PR adds the missing SYCL 2020 spec (i.e., non-extension) device info queries to
dpctl.SyclDevice