masahi commented on pull request #8102:
URL: https://github.com/apache/tvm/pull/8102#issuecomment-846278704


   @Lunderberg If I make this change,
   ```
   -  // decorate the array type.
   -  this->Decorate(spv::OpDecorate, arr_type, spv::DecorationArrayStride, 
nbytes);
   +  if (!interface_block) {
   +    // decorate the array type.
   +    this->Decorate(spv::OpDecorate, arr_type, spv::DecorationArrayStride, 
nbytes);
   +  }
   ```
   
   I get this error 
   ```
     1: tvm::codegen::BuildSPIRV(tvm::IRModule, tvm::Target, bool)
     0: tvm::codegen::SPIRVTools::ValidateShader(std::vector<unsigned int, 
std::allocator<unsigned int> > const&)
     File "/home/masa/projects/dev/tvm/src/target/spirv/build_vulkan.cc", line 
68
   TVMError: 
   ---------------------------------------------------------------
   An error occurred during the execution of TVM.
   For more information, please see: https://tvm.apache.org/docs/errors.html
   ---------------------------------------------------------------
   
     Check failed: res == SPV_SUCCESS (-10 vs. 0) :  index=33 error:Structure 
id 10 decorated as Block for variable in StorageBuffer storage class must 
follow standard storage 
   buffer layout rules: member 0 contains an array with stride 0, but with an 
element size of 4
     %_struct_10 = OpTypeStruct %_runtimearr_float
   ```
   
   Looking at the spec sentence, I wonder what exactly ` array that contains a 
structure` means. Isn't array itself a structure? What does it mean to have an 
array that contains `Block`?


-- 
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