LeiWang1999 commented on PR #14863:
URL: https://github.com/apache/tvm/pull/14863#issuecomment-1589045778

   looks like something unfriendly happens with the pass `FP8StorageLegalize` 
under `rocm` backend. @yzh119 
   
   ```python
   # from tvm.script import tir as T
   
   M = 64
   N = 64
   
   @tvm.script.ir_module
   class MyModule:
       @T.prim_func
       def main(a: T.handle, b: T.handle):
           T.func_attr({"global_symbol": "main"})
           A = T.match_buffer(a, (M, N))
           B = T.match_buffer(b, (M, N))
           for i, j in T.grid(M, N):
               with T.block("B"):
                   vi, vj = T.axis.remap("SS", [i, j])
                   B[vi, vj] = A[vi, vj] * 2.0
   
   Traceback (most recent call last):
     File "memory_copy.py", line 37, in <module>
       rocm_mod = tvm.build(sch.mod, target="rocm --host=llvm")
     File "/home/aiscuser/v-leiwang3/tvm/python/tvm/driver/build_module.py", 
line 281, in build
       rt_mod_host = _driver_ffi.tir_to_runtime(annotated_mods, target_host)
     File 
"/home/aiscuser/v-leiwang3/tvm/python/tvm/_ffi/_ctypes/packed_func.py", line 
238, in __call__
       raise get_last_ffi_error()
   tvm._ffi.base.TVMError: Traceback (most recent call last):
     12: TVMFuncCall
     11: 
tvm::runtime::PackedFuncObj::Extractor<tvm::runtime::PackedFuncSubObj<tvm::runtime::TypedPackedFunc<tvm::runtime::Module
 (tvm::runtime::Map<tvm::Target, tvm::IRModule, void, void> const&, 
tvm::Target)>::AssignTypedLambda<tvm::{lambda(tvm::runtime::Map<tvm::Target, 
tvm::IRModule, void, void> const&, 
tvm::Target)#6}>(tvm::{lambda(tvm::runtime::Map<tvm::Target, tvm::IRModule, 
void, void> const&, tvm::Target)#6}, std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >)::{lambda(tvm::runtime::TVMArgs 
const&, tvm::runtime::TVMRetValue*)#1}> >::Call(tvm::runtime::PackedFuncObj 
const*, std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >, tvm::runtime::TVMRetValue)
     10: tvm::TIRToRuntime(tvm::runtime::Map<tvm::Target, tvm::IRModule, void, 
void> const&, tvm::Target const&)
     9: tvm::SplitMixedModule(tvm::IRModule, tvm::Target const&, tvm::Target 
const&)
     8: tvm::ApplyPasses(tvm::IRModule, tvm::transform::Sequential)
     7: tvm::transform::Pass::operator()(tvm::IRModule) const
     6: tvm::transform::Pass::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     5: tvm::transform::SequentialNode::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     4: tvm::transform::Pass::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     3: tvm::tir::transform::PrimFuncPassNode::operator()(tvm::IRModule, 
tvm::transform::PassContext const&) const
     2: _ZN3tvm7runtime13PackedFuncObj
     1: tvm::runtime::TypedPackedFunc<tvm::tir::PrimFunc (tvm::tir::PrimFunc, 
tvm::IRModule, 
tvm::transform::PassContext)>::AssignTypedLambda<tvm::tir::transform::FP8StorageLegalize()::{lambda(tvm::tir::PrimFunc,
 tvm::IRModule, 
tvm::transform::PassContext)#1}>(tvm::tir::transform::FP8StorageLegalize()::{lambda(tvm::tir::PrimFunc,
 tvm::IRModule, tvm::transform::PassContext)#1})::{lambda(tvm::runtime::TVMArgs 
const&, tvm::runtime::TVMRetValue*)#1}::operator()(tvm::runtime::TVMArgs const, 
tvm::runtime::TVMRetValue) const
     0: tvm::tir::StorageLegalizer::Legalize(tvm::tir::PrimFunc)
     File 
"/home/aiscuser/v-leiwang3/tvm/src/tir/transforms/unsupported_dtype_legalize.cc",
 line 478
   TVMError: 
   ---------------------------------------------------------------
   An error occurred during the execution of TVM.
   For more information, please see: https://tvm.apache.org/docs/errors.html
   ---------------------------------------------------------------
   
     Check failed: func->buffer_map.size() == 0 (2 vs. 0) : This pass must be 
called after MakePackedAPI
   ```


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