-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Implement the GroupMemoryBarrierWithGroupSync
HLSL Function
#70103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
12 tasks
llvm-beanz opened this issue
Oct 24, 2023
· 2 comments
· Fixed by #111883, #111884, #111888 or #114349
Closed
12 tasks
Implement the GroupMemoryBarrierWithGroupSync
HLSL Function
#70103
llvm-beanz opened this issue
Oct 24, 2023
· 2 comments
· Fixed by #111883, #111884, #111888 or #114349
Labels
Comments
GroupMemoryBarrierWithGroupSync
intrinsicGroupMemoryBarrierWithGroupSync
HLSL Function
52 tasks
Marking re-estimate this. Since this was originally refined, we have a different approach to implementing intrinsics and the way we've been estimating intrinsics has changed quite a bit. |
I'll be working on this. |
This was referenced Oct 10, 2024
adam-yang
added a commit
that referenced
this issue
Oct 29, 2024
Loading
Loading status checks…
partially fixes #70103 ### Changes * Added int_spv_group_memory_barrier_with_group_sync intrinsic in IntrinsicsSPIRV.td * Added lowering for int_spv_group_memory_barrier_with_group_sync in SPIRVInstructionSelector.cpp * Added SPIRV backend test case ### Related PRs * [[clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic #111883](#111883) * [[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic #111884](#111884)
NoumanAmir657
pushed a commit
to NoumanAmir657/llvm-project
that referenced
this issue
Nov 4, 2024
fixes llvm#112974 partially fixes llvm#70103 ### Changes - Added new tablegen based way of lowering dx intrinsics to DXIL ops. - Added int_dx_group_memory_barrier_with_group_sync intrinsic in IntrinsicsDirectX.td - Added expansion for int_dx_group_memory_barrier_with_group_sync in DXILIntrinsicExpansion.cpp` - Added DXIL backend test case ### Related PRs * [[clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic llvm#111883](llvm#111883) * [[SPIRV] Add GroupMemoryBarrierWithGroupSync intrinsic llvm#111888](llvm#111888)
NoumanAmir657
pushed a commit
to NoumanAmir657/llvm-project
that referenced
this issue
Nov 4, 2024
partially fixes llvm#70103 ### Changes * Added int_spv_group_memory_barrier_with_group_sync intrinsic in IntrinsicsSPIRV.td * Added lowering for int_spv_group_memory_barrier_with_group_sync in SPIRVInstructionSelector.cpp * Added SPIRV backend test case ### Related PRs * [[clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic llvm#111883](llvm#111883) * [[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic llvm#111884](llvm#111884)
adam-yang
added a commit
that referenced
this issue
Dec 3, 2024
Loading
Loading status checks…
partially fixes #70103 ### Changes * Implemented `GroupMemoryBarrierWithGroupSync` clang builtin * Linked `GroupMemoryBarrierWithGroupSync` clang builtin with `hlsl_intrinsics.h` * Added sema checks for `GroupMemoryBarrierWithGroupSync` to `CheckHLSLBuiltinFunctionCall` in `SemaChecking.cpp` * Add codegen for `GroupMemoryBarrierWithGroupSync` to `EmitHLSLBuiltinExpr` in `CGBuiltin.cpp` * Add codegen tests to `clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl` * Add sema tests to `clang/test/SemaHLSL/BuiltIns/GroupMemoryBarrierWithGroupSync-errors.hlsl` ### Related PRs * [[DXIL] Add GroupMemoryBarrierWithGroupSync intrinsic #111884](#111884) * [[SPIRV] Add GroupMemoryBarrierWithGroupSync intrinsic #111888](#111888)
51 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
AC:
** Maps to the correct construct
GroupMemoryBarrierWithGroupSync
clang builtin,GroupMemoryBarrierWithGroupSync
clang builtin withhlsl_intrinsics.h
GroupMemoryBarrierWithGroupSync
toCheckHLSLBuiltinFunctionCall
inSemaChecking.cpp
GroupMemoryBarrierWithGroupSync
toEmitHLSLBuiltinExpr
inCGBuiltin.cpp
clang/test/CodeGenHLSL/builtins/GroupMemoryBarrierWithGroupSync.hlsl
clang/test/SemaHLSL/BuiltIns/GroupMemoryBarrierWithGroupSync-errors.hlsl
int_dx_GroupMemoryBarrierWithGroupSync
intrinsic inIntrinsicsDirectX.td
DXILOpMapping
ofint_dx_GroupMemoryBarrierWithGroupSync
to80
inDXIL.td
GroupMemoryBarrierWithGroupSync.ll
andGroupMemoryBarrierWithGroupSync_errors.ll
tests inllvm/test/CodeGen/DirectX/
int_spv_GroupMemoryBarrierWithGroupSync
intrinsic inIntrinsicsSPIRV.td
GroupMemoryBarrierWithGroupSync
lowering and map it toint_spv_GroupMemoryBarrierWithGroupSync
inSPIRVInstructionSelector::selectIntrinsic
.llvm/test/CodeGen/SPIRV/hlsl-intrinsics/GroupMemoryBarrierWithGroupSync.ll
DirectX
SPIR-V
OpControlBarrier:
Description:
Wait for all active invocations within the specified
Scope to reach the current point of execution.
All active invocations within Execution scope reach
this point of execution before any invocation proceeds beyond it.
When Execution is Workgroup or larger, behavior is undefined
unless all invocations within Execution execute the same dynamic
instance of this instruction.
If Semantics is not None, this instruction also serves as an
OpMemoryBarrier instruction, and also performs
and adheres to the description and semantics of an OpMemoryBarrier
instruction with the same Memory and Semantics operands. This allows
atomically specifying both a control barrier and a memory barrier (that
is, without needing two instructions). If Semantics is None,
Memory is ignored.
Before version 1.3, it is only valid to use this instruction with
TessellationControl, GLCompute, or Kernel execution
models. There is no such restriction starting with
version 1.3.
If used with the TessellationControl execution
model, it also implicitly synchronizes the Output
Storage Class: Writes to Output variables
performed by any invocation executed prior to a OpControlBarrier are
visible to any other invocation proceeding beyond that
OpControlBarrier.
4
224
Scope <id>
Execution
Scope <id>
Memory
Memory Semantics <id>
Semantics
Test Case(s)
Example 1
HLSL:
Blocks execution of all threads in a group until all group shared accesses have been completed and all threads in the group have reached this call.
Syntax
void GroupMemoryBarrierWithGroupSync(void);
Parameters
This function has no parameters.
Return value
This function does not return a value.
Remarks
The behavior of calls to this function that are within diverging branches of a thread group are undefined.
Minimum Shader Model
This function is supported in the following shader models.
This function is supported in the following types of shaders:
See also
Intrinsic Functions
Shader Model 5
The text was updated successfully, but these errors were encountered: