tvm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [tvm] apivovarov opened a new pull request #8860: Add support for llvm parameter -target-abi
Date Thu, 26 Aug 2021 20:33:03 GMT

apivovarov opened a new pull request #8860:
URL: https://github.com/apache/tvm/pull/8860


   This PR adds support for llvm/llc parameter `-target-abi`.
   It is needed to compile models for RISCV64 RC64GC cpu (supported instructions MAFD + C)
   
   CPU example is [sifive-u54](https://github.com/llvm/llvm-project/blob/d480f968ad8b56d3ee4a6b6df5532d485b0ad01e/llvm/include/llvm/Support/RISCVTargetParser.def#L23).
   
   Specifying just `mcpu=sifive-u54` parameter is not enough. I found that we also need to
specify `--target-abi=lp64d` parameter.
   
   Target string example:
   ```
   llvm -mtriple=riscv64-unknown-linux-gnu -mcpu=sifive-u54 -target-abi=lp64d -device=arm_cpu
   ```
   
   If we do not specify `-target-abi=lp64d`  then the linking process (`lib.export_library`)
which generates `model.so` will fail with the following error
   ```
   can't link soft-float modules with double-float modules
   ```
   
   Related discussion: https://discuss.tvm.apache.org/t/cant-link-soft-float-modules-with-double-float-modules/10140
   
   
   


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message