Skip to content

Commit c11ce49

Browse files
jimmytweiroot
andauthored
Updated PointPillars sample to compile in the CI system. (#1996)
Co-authored-by: root <root@DUT045DG1RVC.fm.intel.com>
1 parent d9243d4 commit c11ce49

File tree

4 files changed

+39
-8
lines changed

4 files changed

+39
-8
lines changed

AI-and-Analytics/End-to-end-Workloads/LidarObjectDetection-PointPillars/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ include(CMakePackageConfigHelpers)
55

66
set(CXX_STANDARD_REQUIRED ON)
77
set(CMAKE_CXX_STANDARD 17)
8-
set(CMAKE_CXX_COMPILER dpcpp)
8+
set(CMAKE_CXX_COMPILER icpx)
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsycl")
910

1011
project(LidarObjectDetection-PointPillars VERSION 1.0.0)
1112

@@ -14,9 +15,9 @@ project(LidarObjectDetection-PointPillars VERSION 1.0.0)
1415
############################################################
1516
find_package(OpenVINO REQUIRED)
1617

17-
find_path(SYCL_HEADERS CL/sycl.hpp PATHS $ENV{ONEAPI_ROOT}/compiler/latest/linux/include/sycl PATH_SUFFIXES / NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
18-
find_path(DPCPP_HEADERS oneapi/dpl/iterator PATHS $ENV{ONEAPI_ROOT}/dpl/latest/linux/include PATH_SUFFIXES / NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
19-
find_library(SYCL_LIB sycl PATHS $ENV{ONEAPI_ROOT}/compiler/latest/linux PATH_SUFFIXES lib NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
18+
find_path(SYCL_HEADERS CL/sycl.hpp PATHS $ENV{ONEAPI_ROOT}/compiler/latest/include/sycl PATH_SUFFIXES / NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
19+
find_path(DPCPP_HEADERS oneapi/dpl/iterator PATHS $ENV{ONEAPI_ROOT}/dpl/latest/include PATH_SUFFIXES / NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
20+
find_library(SYCL_LIB sycl PATHS $ENV{ONEAPI_ROOT}/compiler/latest PATH_SUFFIXES lib NO_CMAKE_FIND_ROOT_PATH NO_CMAKE_SYSTEM_PATH NO_DEFAULT_PATH)
2021

2122
if(NOT DPCPP_HEADERS)
2223
message(FATAL_ERROR "No DPCPP Headers for oneAPI found. Please check the environment variable ONEAPI_ROOT")
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#! /bin/bash
2+
# Build and install OpenCL ICD Loader
3+
apt -y install ruby-full
4+
5+
git clone --recursive https://github.com/KhronosGroup/OpenCL-CLHPP
6+
git clone https://github.com/KhronosGroup/OpenCL-ICD-Loader
7+
git clone https://github.com/KhronosGroup/OpenCL-Headers
8+
9+
cmake -D CMAKE_INSTALL_PREFIX=./OpenCL-Headers/install -S ./OpenCL-Headers -B ./OpenCL-Headers/build
10+
cmake --build ./OpenCL-Headers/build --target install
11+
12+
cmake -D CMAKE_PREFIX_PATH=`$PWD`/OpenCL-Headers/install -D CMAKE_INSTALL_PREFIX=./OpenCL-ICD-Loader/install -S ./OpenCL-ICD-Loader -B ./OpenCL-ICD-Loader/build
13+
cmake --build ./OpenCL-ICD-Loader/build --target install
14+
15+
cmake -D CMAKE_PREFIX_PATH="`$PWD`/OpenCL-Headers/install;`$PWD`/OpenCL-ICD-Loader/install" -D CMAKE_INSTALL_PREFIX=./OpenCL-CLHPP/install -S ./OpenCL-CLHPP -B ./OpenCL-CLHPP/build
16+
cmake --build ./OpenCL-CLHPP/build --target install
17+
18+
export OpenCLHeadersCpp_DIR=$PWD/OpenCL-CLHPP/build/OpenCLHeadersCpp
19+
20+
# Install OpenVINO 2023.1.0 and Boost libraries
21+
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
22+
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
23+
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
24+
echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu22 main" | sudo tee /etc/apt/sources.list.d/intel-openvino-2023.list
25+
26+
apt update
27+
apt -y install openvino-2023.1.0 libboost-all-dev
28+

AI-and-Analytics/End-to-end-Workloads/LidarObjectDetection-PointPillars/sample.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111
"ciTests": {
1212
"linux": [{
1313
"steps": [
14-
"mkdir build",
14+
"./get_dependencies.sh",
15+
"mkdir build",
1516
"cd build",
1617
"cmake ..",
17-
"make"
18+
"make",
19+
"./example.exe"
1820
]
1921
}]
2022
},
2123
"expertise": "Reference Designs and End to End"
22-
}
24+
}

AI-and-Analytics/End-to-end-Workloads/LidarObjectDetection-PointPillars/src/pointpillars/pointpillars.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <thread>
2525
#include "devicemanager/devicemanager.hpp"
2626

27-
#include <CL/sycl/backend/opencl.hpp>
27+
#include <sycl/backend/opencl.hpp>
2828

2929
namespace pointpillars {
3030
PointPillars::PointPillars(const float score_threshold, const float nms_threshold, const PointPillarsConfig &config)

0 commit comments

Comments
 (0)