cbalint13 opened a new pull request, #18232:
URL: https://github.com/apache/tvm/pull/18232

   This fix instruct LLVM debuginfo to not emit entries for invalid variable 
types.
   
   Prior to this, it was impossible to build and run a valid TIR program having 
a flow with scalable vectors.
   ```
   tvm/src/target/llvm/codegen_llvm.cc", line 2163,
           in tvm::codegen::CodeGenLLVM::VisitStmt_(tvm::tir::LetStmtNode 
const*)
      AddDebugInformation(value, op->var);
   {...} 
   File 
"/home/cbalint/rpmbuild/BUILD/tvm-0.21.0-build/tvm/src/target/llvm/codegen_llvm.cc",
  line 2277, 
      in tvm::codegen::CodeGenLLVM::AddDebugInformation(llvm::Value*, 
tvm::tir::Var const&, llvm::Instruction*)
    auto dbg_dtype = GetDebugType(GetType(tir_var));
   {...}
   
   tvm.error.InternalError: Can't fetch the lanes of a scalable vector at a 
compile time.
   
   ```
   This was discovered in [PR#18182](https://github.com/apache/tvm/pull/18182) 
by manual checking the TIR kernels.
   
   #### Notes
   
   * More direct ```is_void()``` voidness check,  ```.lanes()```  property 
check is bundled with exception throw.
   * In case of scalabe vector types do not emit debuginfo, also do not emit 
debug info for other unknown types.
   
   A testcase now covers this issue for the future.
   


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

To unsubscribe, e-mail: [email protected]

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

Reply via email to