Skip to content

Commit 7c21470

Browse files
authored
[BugFix][Vulkan][CodeGen] Change OpControlBarrier to AcquireRelease (#19619)
Fixes #18915 Vulkan codegen previously generated sequentially constistant OpControlBarrier SPIR-V instructions, which is invalid for Vulkan, where we would expect AcquireRelease.
1 parent 4bcf694 commit 7c21470

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/target/vulkan/codegen_spirv.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ spirv::Value CodeGenSPIRV::CreateStorageSync(const CallNode* op) {
160160
uint32_t vulkan_api_version = spirv_support_.vulkan_api_version;
161161

162162
int64_t sync_scope;
163-
int64_t memory_semantics = spv::MemorySemanticsSequentiallyConsistentMask;
163+
int64_t memory_semantics = spv::MemorySemanticsAcquireReleaseMask;
164164
if ((sync == "warp") && (vulkan_api_version >= VK_API_VERSION_1_1)) {
165165
// Synchronize control at the Subgroup level, but memory at the
166166
// Workgroup level. This is because different invocations in a

0 commit comments

Comments
 (0)