Skip to content

Commit 3ba4aa0

Browse files
authored
xpu using same api create_async_load (#73504)
1 parent 7a72522 commit 3ba4aa0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

python/paddle/incubate/tensor/manipulation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ def create_async_load():
108108
Constructs a new AsyncLoad object.
109109
It is used to load/reload data asynchronously on GPU.
110110
"""
111-
return core.AsyncLoad()
111+
if paddle.is_compiled_with_xpu():
112+
return core.XpuAsyncLoad()
113+
else: # default is GPU or CUDA
114+
return core.AsyncLoad()
112115

113116

114117
def create_xpu_async_load():

0 commit comments

Comments
 (0)