-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCLomatic] Fix incorrect typecast of
sycl::malloc
return type in …
…case of CUDA type redefination (#2146) Co-authored-by: Jiang, Zhiwei <[email protected]>
- Loading branch information
1 parent
9b3c121
commit cbf7309
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// UNSUPPORTED: system-linux | ||
// RUN: dpct --format-range=none -out-root %T/cu_mem_alloc_typedef %s --cuda-include-path="%cuda-path/include" -- -std=c++14 -x cuda --cuda-host-only | ||
// RUN: FileCheck %s --match-full-lines --input-file %T/cu_mem_alloc_typedef/cu_mem_alloc_typedef.dp.cpp | ||
#include <cstdint> | ||
#include <cuda.h> | ||
|
||
typedef uint64_t CUdeviceptr; | ||
|
||
// CHECK: void foo(dpct::device_ptr ptr) { | ||
void foo(CUdeviceptr ptr) { | ||
// CHECK: ptr = (dpct::device_ptr)sycl::malloc_device(1024, dpct::get_in_order_queue()); | ||
cuMemAlloc(&ptr, 1024); | ||
} |