diff --git a/python/hidet/ir/primitives/cuda/memcpy.py b/python/hidet/ir/primitives/cuda/memcpy.py index bf62c0d53..224fa08a8 100644 --- a/python/hidet/ir/primitives/cuda/memcpy.py +++ b/python/hidet/ir/primitives/cuda/memcpy.py @@ -27,5 +27,5 @@ def memcpy_async(dst: Expr, src: Expr, count: Expr, kind: str): raise RuntimeError(f'Unsupported transfer from {src} to {dst}, candidate kinds are {list(kind_map.keys())}') return BlackBoxStmt( - 'cudaMemcpyAsync({}, {}, {}, {}, (cudaStream_t){});'.format(dst, src, count, kind_map[kind], get_cuda_stream()) + f'cudaMemcpyAsync({{}}, {{}}, {{}}, {kind_map[kind]}, (cudaStream_t){{}});', dst, src, count, get_cuda_stream() )