SVE / SVE2 support in GNU toolchain - sve

I want to write an SVE/SVE2 code (assembly and/or C intrinsic) code. Which version of GNU supports SVE / SVE2? I am also interested in auto-vectorization if that is supported.

SVE assembly/disassembly/auto-vectorization is supported in GCC 8.x onwards. SVE C intrinsics (also known as ACLE) is supported in GCC 10.x.
SVE2 assembly/disassembly/auto-vectorization/C-intrinsics is supported in GCC10.x onwards.
For full details, visit https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/sve-support

LLVM toolchain SVE Support Messages and GNU Toolchain Messages.

Related

How do I use the OpenCL C++/C++ for OpenCL kernel languages?

I have only tried compiling kernels using pyopencl, but I can only seem to be able to use OpenCl C. Looking at clinfo, I only see support for CLC listed, heres some truncated output from my pc:
Platform Name AMD Accelerated Parallel Processing
Platform Vendor Advanced Micro Devices, Inc.
Platform Version OpenCL 2.1 AMD-APP (3423.0)
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd cl_amd_event_callback
Platform Extensions function suffix AMD
Platform Host timer resolution 1ns
Platform Name AMD Accelerated Parallel Processing
Number of devices 1
Device Name gfx1031
Device Vendor Advanced Micro Devices, Inc.
Device Vendor ID 0x1002
Device Version OpenCL 2.0
Driver Version 3423.0 (HSA1.1,LC)
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Board Name (AMD) AMD Radeon RX 6700 XT
Device PCI-e ID (AMD) 0x73df
Device Topology (AMD) PCI-E, 0000:2f:00.0
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 20
I am using a rocm driver compiled from the AUR, I tried to also install the mesa driver alongside but could not do so (perhaps I need to uninstall the other, but I dread having to recompile it if mesa fails).
My laptop (intel hd graphics) seems to support OpenCL 3.0 but also only lists CLC support. What am I missing, is this not implemented yet? I saw something somewhere about "offline compilation" and maybe using a "clc++" option with clang but can someone elaborate?
C++ for OpenCL can be used in two ways:
Online compilation
If OpenCL device supports cl_ext_cxx_for_opencl, it is possible to compile a program written using the C++ for OpenCL kernel language in runtime. Applications may pass -cl-std=CLC++ to clCompileProgram and clBuildProgram for programs created using clCreateProgramFromSource to request the program be built as C++ for OpenCL.
Offline compilation
If OpenCL device allows to create the program with SPIR-V, then it is possible to compile C++ for OpenCL source into intermediate LLVM IR:
clang -c -cl-std=clc++ -target spir64 -O3 -emit-llvm -o test.ll test.clcpp
Next, LLVM IR can be translated into SPIR-V using llvm-spirv:
llvm-spirv test.ll -o test.spv
Finally, OpenCL program can be created using clCreateProgramWithIL call:
std::ifstream il_file("test.spv", std::ios::binary);
std::vector<char> il_buffer;
std::copy(std::istreambuf_iterator<char>(il_file),
std::istreambuf_iterator<char>(),
std::back_inserter(il_buffer));
cl_program program =
clCreateProgramWithIL(context, il_buffer.data(), il_buffer.size(), &ret);
For PyOpenCL:
with open('test.spv', 'rb') as il_file:
il_buffer = bytes(il_file.read())
prg = cl.Program(ctx, il_buffer)
To check that OpenCL device supports SPIR-V modules, you need to use CL_DEVICE_IL_VERSION query in OpenCL 2.1 or newer and the CL_DEVICE_ILS_WITH_VERSION query in OpenCL 3.0 or newer.
For additional information about offline compilation please see Offline Compilation of OpenCL Kernels into SPIR-V Using Open Source Tooling article.

Ada toolchain for Windows CE

Is there an Ada toolchain for Windows CE with a TI AM335X processor?
If there is nothing "out of the box," is it possible to build GCC with Ada support for this platform?
I checked SofCheck AdaMagic from MapuSoft AppCOE. It works, although adabgen.inf and other files are missing, and you'll have to learn it to deal with non-standard compiler.

IDE for GNAT 3.15p Ada compiler

I am using the GNAT 3.15p Ada compiler which is suggested for RTRT. I was using GPS IDE with another version of the GNAT Ada compiler. Is there any IDE available for the GNAT 3.15p compiler? Can I use GPS IDE itself, if so how to change the compiler?
Thanks
Padmapriya
I believe that GPS will use the first gcc and gnatmake that it finds on the PATH.
Normally, installing GNAT on Windows will set up the PATH properly; if you already have a later GNAT+GPS installed, installing 3.15p should put itself first on the PATH.
The latest GPS you can find (e.g. GPS from GNAT GPL 2012) might support GNAT 3.15p (although the officially stated support only goes back as far as GNAT Pro 3.16a1). Look in the newer GPS manual for the "multiple toolchains" feature. This works very well for using a newer GNAT toolset with an older compiler. The "multiple toolchains" settings will override the OS path variable settings.
See http://docs.adacore.com/gps-docs/users_guide/_build/html/compilation.html#working-with-two-compilers
If you use gpr files you will probably have to restrict yourself to project file features that were available in GNAT 3.15p.
You might also have some luck with either GNATbench on Eclipse or AdaGIDE as alternate IDEs.

Use a LLVM compiled version of Qt

I've seen some mkspec for mac or linux using llvm.
Does anyone use an llvm compiled version of Qt ? Or llvm on their Qt Projects ? does it speed up compilation times ? Is your project faster ?
According to this bug compiling Qt using LLVM is not yet possible.
This is not true - Qt can be compiled via llvm-gcc since version 1.9. clang is currently "almost" able to compile Qt fully. Note that the code of Qt is not sometimes standard-compliant :)

What non-Linux unixes support openat()?

openat() was added to POSIX in the POSIX.1-2008 revision, and has been supported by Linux since 2.6.16. How is support on non-Linux UNIXes? eg, Darwin, the *BSDs, and proprietary UNIXes.
Unlike the top answer is saying, all major BSDs and Apple's OS X seem to support it as of today:
DragonFly since DragonFly 2.3.
FreeBSD since FreeBSD 8.0.
Linux since Linux 2.6.16 (for completeness).
NetBSD since NetBSD 7.0.
OpenBSD since OpenBSD 5.0.
OS X since OS X 10.10.
Solaris.
Dragonfly BSD supports it, the rest of the BSDs don't. Solaris of course does.
FreeBSD supports it since version 8.0

Resources