We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c317e9c commit 5e1ff70Copy full SHA for 5e1ff70
dpctl/_sycl_platform.pyx
@@ -267,14 +267,20 @@ cdef class SyclPlatform(_SyclPlatform):
267
"""Returns the default platform context for this platform
268
269
Returns:
270
- SyclContext: The default context for the platform.
+ SyclContext
271
+ The default context for the platform.
272
+ Raises:
273
+ SyclContextCreationError
274
+ If default_context is not supported
275
"""
276
cdef DPCTLSyclContextRef CRef = (
277
DPCTLPlatform_GetDefaultContext(self._platform_ref)
278
)
279
280
if (CRef == NULL):
- raise RuntimeError("Getting default error ran into a problem")
281
+ raise SyclContextCreationError(
282
+ "Getting default_context ran into a problem"
283
+ )
284
else:
285
return SyclContext._create(CRef)
286
0 commit comments