Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

Intel / AMD compilers

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
e8root
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 94
Joined: Fri Feb 09, 2024 3:41 pm

Intel / AMD compilers

  • Quote

Post by e8root » Sat Mar 16, 2024 10:53 pm

Recently I played with Intel compiler. Managed to install "Intel® oneAPI DPC++/C++ Compiler" version 2024.0.2 from https://www.intel.com/content/www/us/en ... #dpcpp-cpp

My supposedly fastest intel config from /etc/portage/env

Code: Select all

COMMON_FLAGS="-O${OPT_LEVEL} -pipe -mtune=native -fomit-frame-pointer -DNDEBUG -flto -fiopenmp -qopenmp -ipo -xhost -axhost"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed -ipo"

CC="/opt/intel/oneapi/compiler/2024.0/bin/icx"
CXX="/opt/intel/oneapi/compiler/2024.0/bin/icpx"
CPP="clang-cpp"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
OPT_LEVEL is separate env config where I can specify O level alongside which compiler to use in package list in /etc/portage/package.env.
So far I built xorg-server and its drivers, pulse audio and all X11 libs and didn't observe any issues for two days.
Only with LTO I had to make few symlinks of intel's libraries to /usr/lib64. The libraries I had to add were all listed when trying to run program. To build I had at first to source setvars.sh script from compiler installation but after adding symlinks to libraries it was not necessary anymore.

Anyways, any suggestions what could be improved for getting absolutely the best performance possible?

------
I also installed (unpacked tar) AMD Optimizing C/C++ and Fortran Compilers (AOCC) from https://www.amd.com/en/developer/aocc.html
I didn't play as much because I am proud user of Intel Raptor Lake but it seems to work fine compiling xterm. In this case I guess performance won't be any better. I do have Carrizo (latest Bulldozer version) CPU in HP-T630 which I plan upgrading to Gentoo from some Debian that runs on it now but I don't think AOCC is optimized for pre-Zen processors and I might just as well use normal GCC/Clang.

It might however make sense to use this compiler for for Zen3 or 4 so anyone has any tweaks for this compiler?

Code: Select all

COMMON_FLAGS="-O${OPT_LEVEL} -march=native -pipe -mtune=native -fomit-frame-pointer -DNDEBUG -flto"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
LDFLAGS="${LDFLAGS} -Wl,-O2 -Wl,--as-needed"

CC="/opt/amd/compiler/bin/clang"
CPP="/opt/amd/compiler/bin/clang-cpp"
CXX="//opt/amd/compiler/bin/clang++"
AR="/opt/amd/compiler/bin/llvm-ar"
NM="/opt/amd/compiler/bin/llvm-nm"
RANLIB="/opt/amd/compiler/bin/llvm-ranlib"
Also, any recommendations where it comes to benchmarks?
Unix Wars - Episode V: AT&T Strikes Back
Top
e8root
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 94
Joined: Fri Feb 09, 2024 3:41 pm

  • Quote

Post by e8root » Sun Mar 17, 2024 11:34 am

Checking directories with Intel compiler I found there is whole "compiler" directory with clang executables - presumably better matched with Intel compiler than system's own Clang 18.
After setting paths to executables in env I figured better way to ensure that any clang tool called will be from from Intel's compiler - by setting PATH inside env file. Something like:

Code: Select all

PATH="/opt/intel/oneapi/compiler/2024.0/bin:/opt/intel/oneapi/compiler/2024.0/bin/compiler:${PATH}"

CC="icx"
CPP="clang-cpp"
CXX="icpx"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
Otherwise I recompiled most X11/Wayland packages which compiled with oneAPI with it at -O2 except few video codec related packages and pulseaudio which got -O3 treatment as if anything those cases can be CPU intensive, won't affect much and and fairly easy to identify and debug. I didn't touch anything serious like system and terminal based tools and these I compile GCC for boring safety.

As far as opeAPI optimizations go there is also -Ofast but all my tests I did in the past with Intel compilers indicate it should not really be used without extensive testing as it can create non-working or glitching out binaries. I even tried building base X11 system with -Ofast but afterwards X11 would not even start.
Unix Wars - Episode V: AT&T Strikes Back
Top
Post Reply

2 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy