Skip to content

Commit c4afd33

Browse files
committed
avoid increasing stack size
1 parent 4840061 commit c4afd33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cuda_core/cuda/core/experimental/_device.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,13 +1202,13 @@ def set_current(self, ctx: Context = None) -> Union[Context, None]:
12021202
if int(ctx) == 0:
12031203
# use primary ctx
12041204
ctx = self._get_primary_context()
1205-
handle_return(driver.cuCtxPushCurrent(ctx))
1205+
handle_return(driver.cuCtxSetCurrent(ctx))
12061206
else:
12071207
ctx_id = handle_return(driver.cuCtxGetDevice())
12081208
if ctx_id != self._id:
12091209
# use primary ctx
12101210
ctx = self._get_primary_context()
1211-
handle_return(driver.cuCtxPushCurrent(ctx))
1211+
handle_return(driver.cuCtxSetCurrent(ctx))
12121212
else:
12131213
# no-op, a valid context already exists and is set current
12141214
pass

0 commit comments

Comments
 (0)