cbalint13 commented on issue #17578:
URL: https://github.com/apache/tvm/issues/17578#issuecomment-2646014655

   @RajS999 
   
   
   > Check failed: (target_machine_ != nullptr) is false: No available targets 
are compatible with triple "mips-linux-gcc"
   
   Based on this error, it seems you don't have ```mips``` support compiled in 
your LLVM.
   
   ---
   
   * You can use to check ```mips``` presence like this here:
      ```
       $ python3 -c "import tvm; print(tvm.target.codegen.llvm_get_targets())"
       ["arm", "armeb", "aarch64", "aarch64_be", "aarch64_32", "avr", "bpfel", 
"bpfeb",
         "hexagon", "loongarch32", "loongarch64",  "mips", "mipsel", "mips64", 
"mips64el",
         "msp430", "powerpc", "powerpcle", "powerpc64", "powerpc64le", "r600", 
"amdgcn", 
         "riscv32", "riscv64", "sparc", "sparcv9", "sparcel", "s390x", "thumb", 
"thumbeb", "i386",
         "x86_64", "xcore", "nvptx", "nvptx64", "lanai", "wasm32", "wasm64"]
      ```
      ```
       $ python3 -c "import tvm; print(tvm.target.codegen.llvm_version_major())"
       20
      ```
   
   If ```mips``` is present in your LLVM library, then "llvm 
-mtriple=mips-linux-gcc" or even "llvm -mtriple=mips---" is fine.
   
   ---
   
   * Please not that if you want a "deployable" library you need:
     ```
     lib.export_library("deployable_model.so", 
fcompile=tvm.contrib.cc.cross_compiler("mips-linux-gnu-gcc"))
     ```
     OR, if you don't have a cross compiler, a non-standalone library:
     ```
     lib.export_library("lib.tar") # python rpc
     ```
    
   * I've checked the program you provided and it works:
     ```
     $ tar -xf lib.tar
     $ file lib0.o 
     lib0.o: ELF 32-bit MSB relocatable, MIPS, MIPS32 version 1 (SYSV), with 
debug_info, not stripped
     ```
   


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