You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is one side-effect of with statements: Their effects propagate down the call stack, even into library code. Consider the following code:
# In library.py@njit(parallel=False)deflibrary_func(...):
...
# In user.pywithdppl.device_context(gpu):
...
library_func(...)
...
In this case, if the with statement is preferred, the library loses control of what's executed inside library_func . Raising an error is okay, IMO, but for this reason, we shouldn't prefer what the with statement says.
Personally, I'd be okay with changing the default value of parallel to parallel=unspecified.
The text was updated successfully, but these errors were encountered:
The design of numba-dpex has been changed to follow the Python Array API's compute-follows-data programming model. As such, the device_context is no longer used to specify the offload device. All offload decisions are handled at the typing phase based on whether the jit function is operating on dpnp arrays that have a queue attribute.
There is one side-effect of
with
statements: Their effects propagate down the call stack, even into library code. Consider the following code:In this case, if the
with
statement is preferred, the library loses control of what's executed insidelibrary_func
. Raising an error is okay, IMO, but for this reason, we shouldn't prefer what thewith
statement says.Personally, I'd be okay with changing the default value of
parallel
toparallel=unspecified
.The text was updated successfully, but these errors were encountered: