Skip to content

Commit

Permalink
Adding OCK demo documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryaSharf committed Jan 29, 2024
1 parent 1dda1f5 commit b704612
Show file tree
Hide file tree
Showing 4 changed files with 544 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/actions/build_vgg_resnet_action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,15 @@ runs:
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 ..
mkdir vgg_data && cp -r vdata/* vgg_data/
# 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 ..
mkdir resnet_data && cp -r rdata/* resnet_data/
# Preparing an image
python $portDNN_source/samples/networks/img2bin.py $(pwd)/Labrador_Retriever_Molly.jpg
Expand All @@ -81,7 +83,7 @@ runs:
- name: Package artifacts
shell: bash
run: |
tar -cvzf network_artifacts.tar.gz vdata rdata Labrador_Retriever_Molly.jpg Labrador_Retriever_Molly.jpg.bin
tar -cvzf network_artifacts.tar.gz vgg_data resnet_data Labrador_Retriever_Molly.jpg Labrador_Retriever_Molly.jpg.bin
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/run_ock_demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ jobs:
mkdir linux_nightly_release
tar -xzf sycl_linux.tar.gz -C linux_nightly_release
- name: Clone oneAPI-samples
run: git clone https://github.com/oneapi-src/oneAPI-samples.git

- name: Setup environment and test Vector Add
run: |
export ONEAPI_ROOT=$(pwd)/linux_nightly_release
export PATH=$(pwd)/linux_nightly_release/bin:$PATH
export LD_LIBRARY_PATH=$(pwd)/linux_nightly_release/lib:$(pwd)/install/lib:$LD_LIBRARY_PATH
$(pwd)/linux_nightly_release/bin/clang++ -fsycl $(pwd)/oneAPI-samples/DirectProgramming/C++SYCL/DenseLinearAlgebra/vector-add/src/vector-add-buffers.cpp -o vect
CA_RISCV_DUMP_IR=1 CA_HAL_DEBUG=1 OCL_ICD_FILENAMES=$(pwd)/install/lib/libCL.so ONEAPI_DEVICE_SELECTOR=opencl:acc SYCL_CONFIG_FILE_NAME="" ./vect
- name: Test RSICV examples
run: |
# Set environment variables
Expand Down Expand Up @@ -93,7 +105,7 @@ jobs:

- name: Package Build Artifacts
run: |
tar -cvzf ock_demo_artifacts.tar.gz install portDNN_build_dir portBLAS_build_dir build_riscv_tests
tar -cvzf ock_demo_artifacts.tar.gz install portDNN_build_dir portBLAS_build_dir build_riscv_tests vect examples/technical_blogs/ock_demo_blog/getting_started.md
- name: Upload Artifacts
uses: actions/upload-artifact@v4
Expand Down
Loading

0 comments on commit b704612

Please sign in to comment.