Skip to content

Commit 0501008

Browse files
committed
Make the buffer RW as Level Zero supports only RW buffers
1 parent 7ae2181 commit 0501008

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

sycl/include/CL/sycl/detail/pi.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,6 @@ typedef enum {
515515
using pi_mem_flags = pi_bitfield;
516516
// Access
517517
constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RW = CL_MEM_READ_WRITE;
518-
constexpr pi_mem_flags PI_MEM_FLAGS_ACCESS_RO = CL_MEM_READ_ONLY;
519518
// Host pointer
520519
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_USE = CL_MEM_USE_HOST_PTR;
521520
constexpr pi_mem_flags PI_MEM_FLAGS_HOST_PTR_COPY = CL_MEM_COPY_HOST_PTR;

sycl/source/detail/device_image_impl.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class device_image_impl {
175175
const detail::plugin &Plugin = getSyclObjImpl(MContext)->getPlugin();
176176
Plugin.call<PiApiKind::piMemBufferCreate>(
177177
detail::getSyclObjImpl(MContext)->getHandleRef(),
178-
PI_MEM_FLAGS_ACCESS_RO | PI_MEM_FLAGS_HOST_PTR_USE,
178+
PI_MEM_FLAGS_ACCESS_RW | PI_MEM_FLAGS_HOST_PTR_USE,
179179
MSpecConstsBlob.size(), MSpecConstsBlob.data(), &MSpecConstsBuffer,
180180
nullptr);
181181
}

0 commit comments

Comments
 (0)