masahi commented on a change in pull request #8048:
URL: https://github.com/apache/tvm/pull/8048#discussion_r632778226



##########
File path: src/target/spirv/ir_builder.cc
##########
@@ -186,13 +215,14 @@ Value IRBuilder::FloatImm(const SType& dtype, double 
value) {
 
 Value IRBuilder::BufferArgument(const SType& value_type, uint32_t 
descriptor_set,
                                 uint32_t binding) {
-  // NOTE: BufferBlock was deprecated in SPIRV 1.3
-  // use StorageClassStorageBuffer instead.
-#if SPV_VERSION >= 0x10300
-  spv::StorageClass storage_class = spv::StorageClassStorageBuffer;
-#else
-  spv::StorageClass storage_class = spv::StorageClassUniform;
-#endif
+  // If SPIRV 1.3+, or with extension SPV_KHR_storage_buffer_storage_class, 
BufferBlock is
+  // deprecated.
+  spv::StorageClass storage_class;
+  if (spirv_support_.supports_storage_buffer_storage_class) {
+    storage_class = spv::StorageClassStorageBuffer;
+  } else {
+    storage_class = spv::StorageClassUniform;
+  }

Review comment:
       Does this mean newer spirv uses uniform buffer exclusively? Is that ok 
given the limit on uniform buffer size.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to