Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/SPIRV/SPIRVInternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ const static char PipeStorage[] = "PipeStorage";
const static char ConstantPipeStorage[] = "ConstantPipeStorage";
const static char VmeImageINTEL[] = "VmeImageINTEL";
const static char JointMatrixINTEL[] = "JointMatrixINTEL";
const static char BufferSurfaceINTEL[] = "BufferSurfaceINTEL";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarnex @vmustya please correct me if I'm wrong - this is being deprecated, right?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sarnex @vmustya any updates on this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, yes as far as I know it's being deprecated but @vmustya should confirm.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, the BufferSurfaceINTEL stateful raw buffers are still used for some workloads.

const static char CooperativeMatrixKHR[] = "CooperativeMatrixKHR";
} // namespace kSPIRVTypeName

Expand Down Expand Up @@ -976,6 +977,7 @@ template <> inline void SPIRVMap<std::string, Op, SPIRVOpaqueType>::init() {
_SPIRV_OP(AvcRefResultINTEL)
_SPIRV_OP(AvcSicResultINTEL)
_SPIRV_OP(VmeImageINTEL)
_SPIRV_OP(BufferSurfaceINTEL)
_SPIRV_OP(CooperativeMatrixKHR)
#undef _SPIRV_OP
add("JointMatrixINTEL", internal::OpTypeJointMatrixINTEL);
Expand Down
23 changes: 23 additions & 0 deletions test/transcoding/spirv-target-types-buffer.ll
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
; Check translation of the buffer surface target extension type
;
; RUN: llvm-as %s -o %t.bc
; RUN: llvm-spirv -spirv-ext=+SPV_INTEL_vector_compute %t.bc -spirv-text -o %t.spv.txt
; RUN: FileCheck < %t.spv.txt %s --check-prefix=CHECK-SPIRV
target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
target triple = "spir-unknown-unknown"

; CHECK-SPIRV: Capability VectorComputeINTEL
; CHECK-SPIRV: Extension "SPV_INTEL_vector_compute"
; CHECK-SPIRV: Name [[#FuncName:]] "foo"
; CHECK-SPIRV: Name [[#ParamName:]] "a"
; CHECK-SPIRV: TypeVoid [[#VoidT:]]
; CHECK-SPIRV: TypeBufferSurfaceINTEL [[#BufferID:]]
; CHECK-SPIRV: Function [[#VoidT]] [[#FuncID:]]
; CHECK-SPIRV-NEXT: FunctionParameter [[#BufferID]] [[#ParamName]]

define spir_kernel void @foo(target("spirv.BufferSurfaceINTEL", 0) %a) #0 {
entry:
ret void
}

attributes #0 = { noinline norecurse nounwind readnone "VCFunction"}