# PIMLibrary **Repository Path**: hotheart1982/PIMLibrary ## Basic Information - **Project Name**: PIMLibrary - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: develop - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-09-23 - **Last Updated**: 2025-09-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # PIMLibrary PIM Runtime library and tools to execute computations on PIM hardware. Platforms supported : HIP, OpenCL # Setup Contribution Environment ## Docker env All Prerequisites for PIMLibrary build and testing are installed in docker image. ``` cd PIMLibrary/docker Please update Dockerfiles to suit your environment before building images. ./build-release.sh Dockerfile.ROCm-4.0.SAIT.GPU ./build-release.sh Dockerfile.Nvidia ./docker-pim.sh ./docker-pim-nvidia.sh image name : docker image to be used (pim-rocm4.0:tf2.3-dev) directory : (optional) Directory to be mapped inside container. default your home directory is mapped ``` # How to build ## Using Script using build.sh script. ``` ./scripts/build.sh all : uninstall, cmake, make, install uninstall : removes all PIMLibrary so and binaries from rocm path cmake : Does cmake make : build PIMLibrary install : installs to rocm path -o : Relative path from current directory where build folder is created -d --debug [optional] : if mentioned, Debug mode will be enabled. -t --target [optional] TARGET : represent which target hardware PIMLibrary is built for. {default : AMD device as target device} supported targets : AMD and NVIDIA. -e --emulator [optional]: enables the execution in emulator mode (where the computation for PIM are imitated using a simulator) for functionality check and debugging. ``` if build is in PIMLibrary directory, to build from scratch using the script, below command can be used: ### TARGET mode (AMD as target) ``` export BUILD_TOOLS_PATH=/opt/rocm-4.0.0/ export OPENCL_PATH=/opt/rocm-4.0.0/opencl ``` ``` ./scripts/build.sh all -o . -t amd ``` ### Emulator mode (AMD as target) ``` export BUILD_TOOLS_PATH=/opt/rocm-4.0.0/ export OPENCL_PATH=/opt/rocm-4.0.0/opencl ``` ``` ./scripts/build.sh all -o . -t amd -e ``` ### TARGET mode (NVIDIA as target) ``` export PIM_PATH=/usr/ export BUILD_TOOLS_PATH=/usr/ export OPENCL_PATH=/usr/ ``` ``` ./scripts/build.sh all -o . -t nvidia ``` ### Emulator mode (NVIDIA as target) ``` export PIM_PATH=/usr/ export BUILD_TOOLS_PATH=/usr/ export OPENCL_PATH=/usr/ ``` ``` ./scripts/build.sh all -o . -t nvidia -e ``` ## Using Commands defaults : ~BUILD_TYPE = RELEASE ~EXECUTION MODE = TARGET ``` mkdir build cd build cmake -DCMAKE_BUILD_TYPE= -DEMULATOR=