-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit_env
More file actions
50 lines (44 loc) · 1.87 KB
/
Copy pathinit_env
File metadata and controls
50 lines (44 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Source this file before building or running FastInfer-SC-AE components:
# source /home/shijinliang/FastInfer-SC-AE/init_env
#
# This is the project-root counterpart to kernel_benchmark/test_env. Source it
# after cd'ing to the project root; the current physical directory is used as
# the project path, so no absolute project path is embedded in this file.
PROJECT_ROOT="$(pwd -P)"
export SpInfer_HOME="$PROJECT_ROOT"
export FlashLLM_HOME="$PROJECT_ROOT"
export FastInfer_HOME="$PROJECT_ROOT"
MySputnikPath="${FastInfer_HOME}/third_party/sputnik"
MySpMMPath="${FastInfer_HOME}"
# MyUSEcuSPARSELT="yes" # Used by sparTA
GlogPath="${FastInfer_HOME}/third_party/glog"
if [ -z "$GlogPath" ]; then
echo "Defining the GLOG path is necessary, but it has not been defined."
else
export GLOG_PATH="$GlogPath"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GLOG_PATH/build/lib"
export CPLUS_INCLUDE_PATH="$CPLUS_INCLUDE_PATH:$GLOG_PATH/build/include"
export LIBRARY_PATH="$LD_LIBRARY_PATH:$GLOG_PATH/build/lib"
fi
if [ -z "$MySputnikPath" ]; then
echo "Sputnik path is not defined."
echo "Sputnik will not be used."
else
echo "Setting up Sputnik environment..."
export SPUTNIK_PATH="$MySputnikPath"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SPUTNIK_PATH/build/sputnik"
fi
if [ -z "$MySpMMPath" ]; then
echo "FastInfer_HOME path is not defined."
echo "FastInfer_HOME will not be used."
else
echo "Setting up FastInfer_HOME environment..."
export SPMM_PATH="$MySpMMPath"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$SPMM_PATH/build"
export LIBRARY_PATH="$LIBRARY_PATH:$SPMM_PATH/build"
fi
# Match kernel_benchmark/test_env: use the active Conda environment when one
# is present. With no active environment, these entries become /include,/lib.
export CPLUS_INCLUDE_PATH="$CONDA_PREFIX/include:$CPLUS_INCLUDE_PATH"
export LD_LIBRARY_PATH="$CONDA_PREFIX/lib:$LD_LIBRARY_PATH"
echo "Done!"