cbalint13 commented on PR #15761:
URL: https://github.com/apache/tvm/pull/15761#issuecomment-1735025580

   @kparzysz-quic
   
   Added the fuctions as ```LLVMTargetInfo``` public members, now looks to be 
it's ideal place.
   Updated the first comment here with the example & usage of the exported 
FFI/PY interface interactions.
   
   #### Changes:
   
    * LLVM 6.0 minimum is required, ever since, even before this PR, this can 
be seen in the old 
[codegen_x86_64.cc](https://github.com/apache/tvm/pull/15761/files#diff-1cf0e6a89e0e7f281f1e234eccc69885f6fb3ea30e9f1dc1876bdfc648c24c55L47-L77)
    * Since the context is ```LLVMTargetInfo``` class itself, getter/checker 
functions are now glued to: ```triple_```, ```cpu_```, ```attrs_```
    * Updated all x86 checkers, as a continuation of #15685 .
    * Added extra testcases to assure the new glue-logic against 
```LLVMTargetInfo```.
   
   #### Caevats:
   
     * ```llvm -mpcu=skylake``` **works on any x86** host since ```-mtriple``` 
will be filled in automatically, **but will fail on non-x86**
     * Error would be: ```LLVM cpu architecture `-mcpu=skylake` is not valid in 
`-mtriple=aarch64-linux-gnu` ```
     *  ```llvm -mtriple=x86_64-linux-gnu -mpcu=skylake``` is the explicit way 
to **assure non-x86 hosts** (updated CI tests)
     * The issue is also vice-versa: any missing ```-mtriple``` having only 
```-mcpu``` on a foreign host will (explicitly) fail.
    
      It is not possible to avoid explicit ```llvm -mtriple``` on foreign 
hosts, atempt to auto-deduct the ```-mtriple``` out of the explicit ```-mcpu``` 
by iterating all LLVM targets may lead to confusion of 32 vs. 64 bit targets 
(i.e. ```arm``` vs. ```aarch64```), and the cpu in such wrongly infered context 
will have very different features.
      
   


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