Results 1 to 6 of 6

Thread: compatible issue between SPIR and LLVM/Clang 3.9+

  1. #1
    Newbie
    Join Date
    Mar 2017
    Posts
    2

    compatible issue between SPIR and LLVM/Clang 3.9+

    SPIR1.2 is defined using LLVM 3.2, and SPIR2.0 is defined using LLVM3.4. And, SPIR is also one of the possible output for SYCL device compiler (and SPIR is chosen in real production computecpp from codeplay) .

    But latest LLVM/clang (for example version 3.9) is not compatible with LLVM 3.2/3.4, mainly in two parts:
    1. some metadata is changed from module level to function level in llvm 3.9.
    for example, the kernel function flag. If spir is pared with llvm/clang 3.9, no kernel function could be found.

    2. mangle is changed (fixed to be correct for Itanium ABI) in llvm3.9. see lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160229/151703.html.
    with this change, the function name/parameters in spir could not be demangled correctly with llvm3.9.


    In open source community, it is nature to follow the new version of llvm/clang, but it conflicts with spir. Do we have any plan to discuss/resolve it? thanks.

  2. #2
    If I understand correctly, clang 3.9.0 and 3.9.1 do not support OpenCL on ARM, and there is nothing that can be done after clang+llvm are compiled.

  3. #3
    Newbie
    Join Date
    Mar 2017
    Posts
    2
    Quote Originally Posted by kisstop View Post
    If I understand correctly, clang 3.9.0 and 3.9.1 do not support OpenCL on ARM, and there is nothing that can be done after clang+llvm are compiled.
    sorry, but does this relative to the compatible issue?

    btw, as far as i know, clang compiles opencl kernel from source code to llvm IR, and then it is up to hardware vendor to convert llvm IR to hardware instructions.

  4. #4
    "But latest LLVM/clang (for example version 3.9) is not compatible with LLVM 3.2/3.4, mainly in two parts"
    Can you tell more details, plz?
    https://www.magestore.com/magento-extensions.html/https://www.magestore.com/magento-2-extensions.html

  5. #5
    Junior Member
    Join Date
    Oct 2016
    Posts
    5
    Not sure if this is relevant, but I noticed it's possible to use eg`-Dllvm=llvm_40`, when compiling llvm, in order to rename the namespace. This means it's possible to link with both llvm versions, hopefully without issue. You can see a gist of the symbol dump of LLVMCore, after building with this define, here: https://gist.github.com/hughperkins/...23460701102b5e

  6. #6
    Both cang 3.9.0 and 3.9.1 do not support OpenCL on ARM
    ------------
    Magento 2 extensions store - Magento 2 XML Sitemap - Magento 2 Ajax Add to Cart - Magento 2 Gallery Extension

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean