-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added cl_khr_fp16 extension support for test vector_times_scalar from…
… spirv_new (#1757) * Added cl_khr_fp16 support for vector_times_scalar from spirv_new (issue #142, spirv_new) * Logging correction
- Loading branch information
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
test_conformance/spirv_new/spirv_asm/vector_times_scalar_half.spvasm32
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,46 @@ | ||
; SPIR-V | ||
; Version: 1.0 | ||
; Generator: Khronos SPIR-V Tools Assembler; 0 | ||
; Bound: 25 | ||
; Schema: 0 | ||
OpCapability Addresses | ||
OpCapability Linkage | ||
OpCapability Kernel | ||
OpCapability Float16 | ||
OpMemoryModel Physical32 OpenCL | ||
OpEntryPoint Kernel %1 "vector_times_scalar" %gl_GlobalInvocationID | ||
OpName %res "res" | ||
OpName %lhs "lhs" | ||
OpName %rhs "rhs" | ||
OpDecorate %5 FuncParamAttr NoCapture | ||
%5 = OpDecorationGroup | ||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId | ||
OpDecorate %gl_GlobalInvocationID Constant | ||
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import | ||
OpGroupDecorate %5 %res %lhs %rhs | ||
%uint = OpTypeInt 32 0 | ||
%v3uint = OpTypeVector %uint 3 | ||
%_ptr_Input_v3uint = OpTypePointer Input %v3uint | ||
%void = OpTypeVoid | ||
%half = OpTypeFloat 16 | ||
%_ptr_CrossWorkgroup_half = OpTypePointer CrossWorkgroup %half | ||
%v4half = OpTypeVector %half 4 | ||
%_ptr_CrossWorkgroup_v4half = OpTypePointer CrossWorkgroup %v4half | ||
%15 = OpTypeFunction %void %_ptr_CrossWorkgroup_v4half %_ptr_CrossWorkgroup_v4half %_ptr_CrossWorkgroup_half | ||
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input | ||
%1 = OpFunction %void None %15 | ||
%res = OpFunctionParameter %_ptr_CrossWorkgroup_v4half | ||
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_v4half | ||
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_half | ||
%16 = OpLabel | ||
%17 = OpLoad %v3uint %gl_GlobalInvocationID Aligned 0 | ||
%18 = OpCompositeExtract %uint %17 0 | ||
%19 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4half %lhs %18 | ||
%20 = OpLoad %v4half %19 Aligned 8 | ||
%21 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_half %rhs %18 | ||
%22 = OpLoad %half %21 Aligned 2 | ||
%23 = OpVectorTimesScalar %v4half %20 %22 | ||
%24 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4half %res %18 | ||
OpStore %24 %23 Aligned 8 | ||
OpReturn | ||
OpFunctionEnd |
50 changes: 50 additions & 0 deletions
50
test_conformance/spirv_new/spirv_asm/vector_times_scalar_half.spvasm64
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,50 @@ | ||
; SPIR-V | ||
; Version: 1.0 | ||
; Generator: Khronos SPIR-V Tools Assembler; 0 | ||
; Bound: 28 | ||
; Schema: 0 | ||
OpCapability Addresses | ||
OpCapability Linkage | ||
OpCapability Kernel | ||
OpCapability Int64 | ||
OpCapability Float16 | ||
OpMemoryModel Physical64 OpenCL | ||
OpEntryPoint Kernel %1 "vector_times_scalar" %gl_GlobalInvocationID | ||
OpName %res "res" | ||
OpName %lhs "lhs" | ||
OpName %rhs "rhs" | ||
OpDecorate %5 FuncParamAttr NoCapture | ||
%5 = OpDecorationGroup | ||
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId | ||
OpDecorate %gl_GlobalInvocationID Constant | ||
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import | ||
OpGroupDecorate %5 %res %lhs %rhs | ||
%ulong = OpTypeInt 64 0 | ||
%v3ulong = OpTypeVector %ulong 3 | ||
%_ptr_Input_v3ulong = OpTypePointer Input %v3ulong | ||
%ulong_32 = OpConstant %ulong 32 | ||
%void = OpTypeVoid | ||
%half = OpTypeFloat 16 | ||
%_ptr_CrossWorkgroup_half = OpTypePointer CrossWorkgroup %half | ||
%v4half = OpTypeVector %half 4 | ||
%_ptr_CrossWorkgroup_v4half = OpTypePointer CrossWorkgroup %v4half | ||
%16 = OpTypeFunction %void %_ptr_CrossWorkgroup_v4half %_ptr_CrossWorkgroup_v4half %_ptr_CrossWorkgroup_half | ||
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3ulong Input | ||
%1 = OpFunction %void None %16 | ||
%res = OpFunctionParameter %_ptr_CrossWorkgroup_v4half | ||
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_v4half | ||
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_half | ||
%17 = OpLabel | ||
%18 = OpLoad %v3ulong %gl_GlobalInvocationID Aligned 0 | ||
%19 = OpCompositeExtract %ulong %18 0 | ||
%20 = OpShiftLeftLogical %ulong %19 %ulong_32 | ||
%21 = OpShiftRightArithmetic %ulong %20 %ulong_32 | ||
%22 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4half %lhs %21 | ||
%23 = OpLoad %v4half %22 Aligned 8 | ||
%24 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_half %rhs %21 | ||
%25 = OpLoad %half %24 Aligned 2 | ||
%26 = OpVectorTimesScalar %v4half %23 %25 | ||
%27 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_v4half %res %21 | ||
OpStore %27 %26 Aligned 8 | ||
OpReturn | ||
OpFunctionEnd |
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