-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build and run Resnet50 and VGG16 actions
to the tartan CI job.
- Loading branch information
1 parent
ce793d3
commit e193319
Showing
2 changed files
with
109 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Setup and build networks; VGG16, Resnet50 | ||
description: Build and run VV16 and Resnet50 with oneAPI base toolkit and oneAPI-Construction-Kit | ||
|
||
inputs: | ||
workspace: | ||
description: 'Main workflow workspace' | ||
default: ${{ github.workspace }} | ||
|
||
runs: | ||
# We don't want a new docker just a list of steps, so mark as composite | ||
using: "composite" | ||
steps: | ||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Install Python libraries and system dependencies | ||
shell: bash | ||
run: | | ||
pip install requests numpy h5py Pillow | ||
sudo add-apt-repository universe | ||
sudo apt-get update | ||
sudo apt-get install -y libblas-dev libopenblas64-dev libopenblas-dev libpthread-stubs0-dev libboost-all-dev | ||
- name: Clone portDNN | ||
shell: bash | ||
run: git clone --recursive --depth 1 --single-branch https://github.com/codeplaysoftware/portDNN.git | ||
|
||
- name: Download Daily Release | ||
shell: bash | ||
run: | | ||
wget "https://github.com/intel/llvm/releases/download/nightly-2023-12-18/sycl_linux.tar.gz" | ||
mkdir linux_nightly_release | ||
tar -xzf sycl_linux.tar.gz -C linux_nightly_release | ||
- name: Set up environment and build networks | ||
shell: bash | ||
run: | | ||
export LD_LIBRARY_PATH=${{ inputs.workspace }}/build/lib:${{ inputs.workspace }}/linux_nightly_release/lib/libsycl.so:${{ inputs.workspace }}/linux_nightly_release/lib:$LD_LIBRARY_PATH | ||
export CMAKE_CXX_COMPILER=${{ inputs.workspace }}/linux_nightly_release/bin/clang++ | ||
export CMAKE_C_COMPILER=${{ inputs.workspace }}/linux_nightly_release/bin/clang | ||
export CA_HAL_DEBUG=1 | ||
export CA_PROFILE_LEVEL=3 | ||
export ONEAPI_DEVICE_SELECTOR=opencl:acc | ||
export OCL_ICD_FILENAMES=${{ inputs.workspace }}/build/lib/libCL.so | ||
# As the oneAPI basetoolkit release has a whitelist of devices, it filters out RefSi. | ||
# To override it, as a temporary solution we can point SYCL_CONFIG_FILE_NAME to ``. | ||
# This way it doesn't set the default sycl.conf. | ||
export SYCL_CONFIG_FILE_NAME="" | ||
export portDNN_source=$(pwd)/portDNN | ||
export OCL_ICD_VENDORS=/dev/null | ||
# VGG16 | ||
mkdir vdata | ||
cd vdata | ||
wget --no-verbose https://storage.googleapis.com/tensorflow/keras-applications/vgg16/vgg16_weights_tf_dim_ordering_tf_kernels.h5 | ||
python $portDNN_source/samples/networks/vgg/h5toBin.py vgg16_weights_tf_dim_ordering_tf_kernels.h5 | ||
cd .. | ||
# Resnet50 | ||
mkdir rdata | ||
cd rdata | ||
wget --no-verbose https://storage.googleapis.com/tensorflow/keras-applications/resnet/resnet50_weights_tf_dim_ordering_tf_kernels.h5 | ||
python $portDNN_source/samples/networks/resnet50/h5toBin.py resnet50_weights_tf_dim_ordering_tf_kernels.h5 | ||
cd .. | ||
# Preparing an image | ||
python $portDNN_source/samples/networks/img2bin.py ${{ inputs.workspace }}/examples/technical_blogs/tartan_blog/Simple.jpg | ||
# Testing on image for VGG16 | ||
CA_HAL_DEBUG=1 CA_PROFILE_LEVEL=3 OCL_ICD_FILENAMES=${{ inputs.workspace }}/build/lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:acc SYCL_CONFIG_FILE_NAME= ${{ inputs.workspace }}/portDNN_build_dir/samples/networks/vgg/vgg vdata/ ${{ inputs.workspace }}/examples/technical_blogs/tartan_blog/Simple.jpg.bin | ||
# Testing on image for Resnet50 | ||
CA_HAL_DEBUG=1 CA_PROFILE_LEVEL=3 OCL_ICD_FILENAMES=${{ inputs.workspace }}/build/lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:acc SYCL_CONFIG_FILE_NAME= ${{ inputs.workspace }}/portDNN_build_dir/samples/networks/resnet50/resnet50 rdata/ ${{ inputs.workspace }}/examples/technical_blogs/tartan_blog/Simple.jpg.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters