How?

How to hard is to change from one to other, I mean in order to update this tool by myself?
It's not that simple. Plus, if all the components aren't in the system, acceleration may not occur.

Upgrade GCC:
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update
sudo apt install gcc-11 g++-11
sudo update-alternatives --installusr/bin/gcc gccusr/bin/gcc-11 100
sudo update-alternatives --installusr/bin/g++ g++usr/bin/g++-11 100
sudo apt install libomp-dev
sudo dpkg -i aocc-compiler-5.0.0_1_amd64.deb
export LD_LIBRARY_PATH=/opt/AMD/aocc-compiler-5.0.0/lib:$LD_LIBRARY_PATH
To make this change permanent, add the above line to your shell configuration file (e.g., ~/.bashrc or ~/.zshrc) and reload it:
source ~/.bashrc
In my case it was essential to remove all Intel intrinsics (_builtin_ia32) from the code since these intrinsics are specific to Intel processors and incompatible with AMD processors.
You need to update the macro definition in Int.h to use the correct intrinsic function name. Specifically, replace __builtin_ia32_sbb_u64 with __builtin_ia32_subborrow_u64.
Makefile
# Compiler
CXX =opt/AMD/aocc-compiler-5.0.0/bin/clang++
# Compiler flags
CXXFLAGS = -m64 -std=c++17 -Ofast -mssse3 -Wall -Wextra \
-Wno-write-strings -Wno-unused-variable -Wno-deprecated-copy \
-Wno-unused-parameter -Wno-sign-compare -Wno-strict-aliasing \
-Wno-unused-but-set-variable \
-march=native -mtune=native \
-funroll-loops -ftree-vectorize -fstrict-aliasing -fno-semantic-interposition \
-fno-trapping-math -flto \
-fassociative-math -fopenmp -mavx2 -mbmi2 -madx
# Linker flags
LDFLAGS = -L/opt/AMD/aocc-compiler-5.0.0/lib -lomp
# Source files
SRCS = Cyclone.cpp SECP256K1.cpp Int.cpp Timer.cpp IntGroup.cpp IntMod.cpp \
Point.cpp
# Object files
OBJS = $(SRCS:.cpp=.o)
# Target executable
TARGET = Cyclone
# Default target
all: fix_rdtsc $(TARGET)
# Target to replace __rdtsc with my_rdtsc
fix_rdtsc:
find . -type f -name '*.cpp' -exec sed -i 's/__rdtsc/my_rdtsc/g' {} +
# Link the object files to create the executable and then delete .o files
$(TARGET): $(OBJS)
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJS)
rm -f $(OBJS) && chmod +x $(TARGET)
# Compile each source file into an object file
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
# Clean up build files
clean:
echo "Cleaning..."
rm -f $(OBJS) $(TARGET)
# Phony targets
.PHONY: all clean fix_rdtsc
Good luck.
