Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (GGML_TSAVORITE)

if (NOT DEFINED MLIR_COMPILER_DIR)
if (NOT DEFINED $ENV{MLIR_SDK_VERSION})
set (MLIR_COMPILER_DIR /proj/rel/sw/sdk-r.0.2.0/compiler)
set (MLIR_COMPILER_DIR /proj/rel/sw/sdk-r.0.2.2/compiler)
message("MLIR_SDK_VERSION not set defaulting to ${MLIR_COMPILER_DIR}")
else()
set (MLIR_COMPILER_DIR $ENV{MLIR_SDK_VERSION}/compiler)
Expand All @@ -24,7 +24,7 @@ if (GGML_TSAVORITE)

if (NOT DEFINED RUNTIME_DIR)
if (NOT DEFINED $ENV{MLIR_SDK_VERSION})
set (RUNTIME_DIR /proj/rel/sw/sdk-r.0.2.0/${GGML_TSAVORITE_TARGET}/runtime)
set (RUNTIME_DIR /proj/rel/sw/sdk-r.0.2.2/${GGML_TSAVORITE_TARGET}/runtime)
message("MLIR_SDK_VERSION not set defaulting to ${RUNTIME_DIR}")
else()
set (RUNTIME_DIR $ENV{MLIR_SDK_VERSION}/${GGML_TSAVORITE_TARGET}/runtime)
Expand All @@ -51,7 +51,7 @@ if (GGML_TSAVORITE)

include_directories($ENV{TSAVORITE_SYSROOT_INCLUDE_DIR})
include_directories(${TSAVORITE_INCLUDE_DIR})
include_directories(${MLIR_COMPILER_DIR}/include/runtime/shim)
include_directories(${MLIR_COMPILER_DIR}/include/tsi-rt/shim)
include_directories(${RUNTIME_DIR}/include)
message("tsavorite backend is enabled")
endif()
Expand Down
2 changes: 1 addition & 1 deletion ggml-tsi-kernel
27 changes: 17 additions & 10 deletions tsi-pkg-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,27 @@

set -e

export MLIR_SDK_VERSION=/proj/rel/sw/sdk-r.0.2.2
export TOOLBOX_DIR=${MLIR_SDK_VERSION}/toolbox/build/install
pip install --upgrade pip
pip install torch==2.7.0
pip install -r ${MLIR_SDK_VERSION}/compiler/python/requirements-common.txt
pip install ${MLIR_SDK_VERSION}/compiler/python/mlir_external_packages-1.5.0-py3-none-any.whl
pip install onnxruntime-training
#Ensure prerequisites are met as follows
echo 'updating submodule'
git submodule update --recursive --init
cd ggml-tsi-kernel/
#module load gcc/13.3.0
export MLIR_SDK_VERSION=/proj/rel/sw/sdk-r.0.2.0
echo 'creating python virtual env'
/proj/local/Python-3.10.12/bin/python3 -m venv blob-creation
source blob-creation/bin/activate
echo 'installing mlir and python dependencies'
pip install --upgrade pip
pip install -r ${MLIR_SDK_VERSION}/compiler/python/requirements-common.txt
pip install ${MLIR_SDK_VERSION}/compiler/python/mlir_external_packages-1.4.2-py3-none-any.whl
pip install onnxruntime-training
#echo 'creating python virtual env'
#/proj/local/Python-3.10.12/bin/python3 -m venv blob-creation
#source blob-creation/bin/activate
#echo 'installing mlir and python dependencies'
#pip install --upgrade pip
#pip install torch==2.7.0
#pip install -r ${MLIR_SDK_VERSION}/compiler/python/requirements-common.txt
#pip install ${MLIR_SDK_VERSION}/compiler/python/mlir_external_packages-1.5.0-py3-none-any.whl
#pip install onnxruntime-training

#build TSI kernels for the Tsavorite backend
#First for FPGA
Expand Down Expand Up @@ -97,7 +104,7 @@ cmake --build build-fpga --config Release


echo 'creating tar bundle for fpga'
TSI_GGML_VERSION=0.2.2
TSI_GGML_VERSION=0.2.3
TSI_GGML_BUNDLE_INSTALL_DIR=tsi-ggml
GGML_TSI_INSTALL_DIR=ggml-tsi-kernel
TSI_GGML_RELEASE_DIR=/proj/rel/sw/ggml
Expand Down