[XPU] Fix Event init failure w/ external (#61743)
Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com> Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
co-authored by
Kunshang Ji
parent
ec8b20fbf0
commit
4e964b2623
@@ -61,9 +61,9 @@ def _torch_cuda_wrapper():
|
||||
torch.cuda.stream = partial(torch.xpu.stream)
|
||||
torch.cuda.set_stream = partial(torch.xpu.set_stream)
|
||||
|
||||
# torch.xpu.Event does not accept the ``blocking`` kwarg that
|
||||
# torch.cuda.Event supports, so drop it here.
|
||||
def _xpu_event(*args, blocking=None, **kwargs):
|
||||
# torch.xpu.Event does not accept the ``blocking`` or ``external`` kwargs
|
||||
# that torch.cuda.Event supports, so drop them here.
|
||||
def _xpu_event(*args, blocking=None, external=None, **kwargs):
|
||||
return torch.xpu.Event(*args, **kwargs)
|
||||
|
||||
torch.cuda.Event = _xpu_event
|
||||
|
||||
Reference in New Issue
Block a user