Hi all,
I was working to compile most needed parts of AMD ROCm 6.1.0 for Slackware 15 / current x86_64
and I now trying to prepare the repository but I have a questions about the process and good practices.
As a Slackware user from version 3.6 I know the packages is named: name-version-arch-build.txz
I compile the sources but I don't want my initials to be on package like name-version-arch-build_initials.txz
My first question is: Do I can name them like name-version-arch-build.txz for example: hipSOLVER-6.1.0-x86_64-1.txz
Second question: Because we don't have a package manager like Ubuntu or Arch to support requirements, I named my files like their compilation order and file: 16.composable-kernel.sh
and inside the file is the whole build script + slack-desc:
Code:
#!/bin/bash
export ROCM_INSTALL_DIR=/opt/rocm
export ROCM_MAJOR_VERSION=6
export ROCM_MINOR_VERSION=1
export ROCM_PATCH_VERSION=0
export PKGVER=6.1.0
export ROCM_REL_DIR=/usr/local/src/rocm/release
export ROCM_BUILD_DIR=/usr/local/src/rocm/rocm-build/build
export PATH=$ROCM_INSTALL_DIR/bin:$ROCM_INSTALL_DIR/llvm/bin:$ROCM_INSTALL_DIR/hip/bin:$CMAKE_DIR/bin:$PATH
export ARCH=${ARCH:-x86_64}
export OUTPUT=${OUTPUT:-/usr/local/src/roc}
export LDIR=${LDIR:-rocm-6.1.0}
echo "|Taking 2 days for compilation|"
cd $ROCM_REL_DIR
wget https://github.com/ROCm/composable_kernel/archive/rocm-$PKGVER.tar.gz
tar xf composable_kernel-$LDIR.tar.gz
rm -rf $ROCM_BUILD_DIR/composable_kernel
mkdir -p $ROCM_BUILD_DIR/composable_kernel
cd $ROCM_BUILD_DIR/composable_kernel
DEST=$OUTPUT/package-composable_kernel
PRGNAM=composable_kernel
#4 job for this package is maximum, otherwise on 16 threads take 300+GB RAM memory and took 2 days
NUMJOBS=4
BUILD=1
#export HIPCC_COMPILE_FLAGS_APPEND="-parallel-jobs=$(nproc)"
#export HIPCC_LINK_FLAGS_APPEND="-parallel-jobs=$(nproc)"
cmake \
-Wno-dev \
-G Ninja \
-D CMAKE_CXX_COMPILER=$ROCM_INSTALL_DIR/bin/hipcc \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=$ROCM_INSTALL_DIR \
-D BUILD_DEV=OFF \
-D INSTANCES_ONLY=ON \
$ROCM_REL_DIR/composable_kernel-$LDIR
"${NINJA:=ninja}" $NUMJOBS || exit 1
DESTDIR=$DEST ${NINJA} install || exit 1
mkdir -p $DEST/install
cat >> $DEST/install/slack-desc << 'END'
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.
# Line up the first '|' above the ':' following the base package name, and
# the '|' on the right side marks the last column you can put a character in.
# You must make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
composable_kernel: composable_kernel (High Performance Composable Kernel for AMD GPUs)
composable_kernel:
composable_kernel: The Composable Kernel (CK) library provides a programming model for
composable_kernel: writing performance-critical kernels for machine learning workloads
composable_kernel: across multiple architectures (GPUs, CPUs, etc.). The CK library
composable_kernel: uses general purpose kernel languages, such as HIP C++.
composable_kernel:
composable_kernel:
composable_kernel:
composable_kernel:
composable_kernel:
END
cd $DEST
makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD.txz
because I will release also the build scripts if some one want to use them or build future versions.
My question is: Do I need to make a slack-desk file or this way like above is also acceptable ?