Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rocAL - External source reader #83

Merged
merged 80 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
755eb52
tensor changes
LakshmiKumar23 Sep 26, 2023
9caa64c
Update Doxyfile
LakshmiKumar23 Sep 26, 2023
6fa17b3
test updates
LakshmiKumar23 Sep 26, 2023
f128ab9
bug fixes
LakshmiKumar23 Sep 27, 2023
215fb90
bug fix
LakshmiKumar23 Sep 27, 2023
d65b188
adding image augemntation app changes
LakshmiKumar23 Sep 28, 2023
40a6ae2
Minor changes
fgladwin Oct 6, 2023
660ccd9
Add ROI structure
fgladwin Oct 6, 2023
11d2cd6
Add support to update multi dimension ROI
fgladwin Oct 6, 2023
d5a74be
Fix build issues wrt ROI struct
fgladwin Oct 9, 2023
93271f4
Merge branch 'develop' into lk/tensor
LakshmiKumar23 Oct 12, 2023
0b6fc58
Merge branch 'develop-tensor' into fg/tensor_generic_roi
SundarRajan98 Oct 16, 2023
8475948
Merge branch 'lk/tensor' of https://github.com/LakshmiKumar23/rocAL i…
fgladwin Oct 17, 2023
efb3f45
Merge branch 'fg/tensor_generic_roi' of https://github.com/fgladwin/r…
fgladwin Oct 17, 2023
223cdec
Merge branch 'fg/tensor_generic_roi' of https://github.com/fgladwin/r…
fgladwin Oct 18, 2023
0a2b646
Merge branch 'develop' of https://github.com/ROCmSoftwarePlatform/roc…
fgladwin Oct 18, 2023
1ac0258
Merge branch 'fg/tensor_roi' into fg/tensor_generic_roi
fgladwin Oct 18, 2023
f9d5fa6
Minor change
fgladwin Oct 18, 2023
987ddbc
Merge branch 'fg/tensor' into fg/tensor_generic_roi
fgladwin Oct 18, 2023
971f614
Remove redundant code
fgladwin Oct 18, 2023
0985898
Minor change
fgladwin Oct 18, 2023
3a04a02
Minor changes
fgladwin Oct 18, 2023
bdb0443
Modify struct names
fgladwin Oct 19, 2023
52de343
Adding external source reader support to rocAL
SundarRajan98 Oct 20, 2023
b290600
ROCm Path - Options added (#73)
kiritigowda Oct 23, 2023
75af629
Remove strides in ROI
fgladwin Oct 24, 2023
daf4913
Change shape to end for ROICords
fgladwin Oct 24, 2023
30390bc
Fix crop dims in ssd random crop
fgladwin Oct 24, 2023
8a825bc
Change ROI type to const in node.h
fgladwin Oct 24, 2023
a771f65
set mem handle with label buffer
SundarRajan28 Oct 25, 2023
5fc4b2d
change casting to c++ style
SundarRajan28 Oct 26, 2023
12609ea
Merge Roi tensor branch
SundarRajan28 Oct 26, 2023
3776f92
Address review comments
SundarRajan28 Oct 27, 2023
d5d8131
Remove external source label reader
fgladwin Oct 27, 2023
0152f62
Minor changes
fgladwin Oct 27, 2023
e29d021
Remove labels bool in loaders
fgladwin Oct 27, 2023
14e6ba3
Minor changes
fgladwin Oct 27, 2023
5ffeec8
Revert storage_type to type
fgladwin Oct 27, 2023
de54706
Minor changes
fgladwin Oct 27, 2023
0fe4b97
Minor changes
fgladwin Oct 27, 2023
2fb286e
Combine all the test modes in pytorch.py
fgladwin Oct 30, 2023
4ef9010
Adding external source support to generic iterator
SundarRajan98 Oct 30, 2023
3828a5a
Adding readme for external source python examples
SundarRajan98 Oct 31, 2023
a8f5d7b
Merge remote-tracking branch 'origin/develop' into external_source_re…
SundarRajan98 Oct 31, 2023
ac66905
CMake Find - Half (#76)
kiritigowda Nov 1, 2023
8320904
Change copyright year
SundarRajan98 Nov 2, 2023
d1fc5fc
Resolving review comments
SundarRajan98 Nov 3, 2023
e586baf
Prerequisites - Boost Removal (#71)
hansely Nov 9, 2023
f1cb0d5
Merge remote-tracking branch 'ToT/develop' into external_source_reader
SundarRajan98 Nov 9, 2023
ad11859
Multiple Inheritance in External Source Reader
swetha097 Nov 15, 2023
ce02683
Add the commit the pass the ROI as xywh structure
swetha097 Nov 15, 2023
f45b74e
Increase the pqd
swetha097 Nov 15, 2023
2c4469a
Put all the examples in a single file
swetha097 Nov 15, 2023
99aa77f
Make minor changes from commit
SundarRajan28 Nov 15, 2023
eaf1052
Merge branch 'external_source_reader' of https://github.com/SundarRaj…
swetha097 Nov 15, 2023
0fc09f6
Del remaining examples
swetha097 Nov 15, 2023
56e3a30
Add changes for ROI
swetha097 Nov 21, 2023
5bfe974
Remove the rocAL external source folder
SundarRajan28 Nov 29, 2023
0c89a7b
Change the ROI struct of vectors to a vector of ROI structs and chang…
swetha097 Dec 7, 2023
04b4bdb
Add NONE to Mode and Resize the size of the ROIxywh vector in cpp uni…
swetha097 Dec 8, 2023
b04dce9
Merge branch 'external_source_reader_check' into external_source_reader
Dec 8, 2023
a986ccb
Remove the print statment
Dec 8, 2023
e2838a5
Pass the vectors as reference
swetha097 Dec 12, 2023
ea1f247
Move the ExternalSourceMode to the right
swetha097 Dec 12, 2023
c30e56e
Add const to pass vectors by reference and add one to one mapping in …
swetha097 Dec 12, 2023
61890cd
Some changes in the example file
swetha097 Dec 12, 2023
e75c44c
Changes in example file
swetha097 Dec 12, 2023
fda81a2
Minor changes in the test suite
swetha097 Dec 12, 2023
9cf3bb1
Remove nchw_to_nhwc conversions
swetha097 Dec 12, 2023
2d74fdc
Merge branch 'master' into external_source_reader
swetha097 Dec 13, 2023
80cace6
Merge branch 'develop' into external_source_reader
swetha097 Dec 13, 2023
aece203
Fix warnings
SundarRajan28 Dec 15, 2023
5087e33
Merge branch 'external_source_reader' of https://github.com/SundarRaj…
Dec 15, 2023
2d377ce
Bracket Spacing
SundarRajan28 Dec 19, 2023
7320123
Merge remote-tracking branch 'ToT/develop' into external_source_reader
SundarRajan98 Jan 3, 2024
4ce813d
Removing boost includes and updating python example
SundarRajan98 Jan 4, 2024
dbdca7e
Resolving review comments
SundarRajan98 Jan 8, 2024
558911b
Readme updates for external source tests
SundarRajan98 Jan 8, 2024
4c0f40d
Adding API changes for external source and set_mem_handle
SundarRajan98 Jan 9, 2024
0edcc74
Reording the pybind for ROIxywh struct
SundarRajan98 Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ find_program(MAKE_NSIS_EXE makensis)
find_program(RPMBUILD_EXE rpmbuild)
find_program(DPKG_EXE dpkg)

set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
# ROCM Path
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not needed anymore.
@kiritigowda: can you confirm

if(DEFINED ENV{ROCM_PATH})
set(ROCM_PATH $ENV{ROCM_PATH} CACHE PATH "Default ROCm installation path")
elseif(ROCM_PATH)
message("-- INFO:ROCM_PATH Set -- ${ROCM_PATH}")
else()
set(ROCM_PATH /opt/rocm CACHE PATH "Default ROCm installation path")
endif()
# avoid setting the default installation path to /usr/local
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX ${ROCM_PATH} CACHE PATH "rocAL default installation path" FORCE)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ rocAL can be currently used to perform the following operations either with rand
* [ROCm](https://rocmdocs.amd.com/en/latest/deploy/linux/installer/install.html) with --usecase=graphics,rocm
* [AMD RPP](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp) - MIVisionX Component
* [AMD OpenVX™](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/master/amd_openvx) and AMD OpenVX™ Extensions: `VX_RPP` and `AMD Media` - MIVisionX Components
* [Boost library](https://www.boost.org) - Version `1.72` or higher
* [Turbo JPEG](https://libjpeg-turbo.org/) - Version 2.0.6.2 from `https://github.com/rrawther/libjpeg-turbo.git`
* [Half-precision floating-point](https://half.sourceforge.net) library - Version `1.12.0` or higher
* [Google Protobuf](https://developers.google.com/protocol-buffers) - Version `3.12.4` or higher
* [LMBD Library](http://www.lmdb.tech/doc/)
* [RapidJSON](https://github.com/Tencent/rapidjson)
* [PyBind11](https://github.com/pybind/pybind11)

* [HIP](https://github.com/ROCm-Developer-Tools/HIP)
* OpenMP
* C++17
## Build instructions

### Prerequisites setup script for Linux - `rocAL-setup.py`
Expand Down Expand Up @@ -175,7 +176,6 @@ For the convenience of the developer, we here provide the setup script which wil
* ROCm: rocm-core - `5.7.0.50700-6`
* RPP - [1.2.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.2.0)
* MIVisionX - [master](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX)
* Boost - [1.72.0](https://www.boost.org/users/history/version_1_72_0.html)
* Protobuf - [V3.12.4](https://github.com/protocolbuffers/protobuf/releases/tag/v3.12.4)
* OpenCV - [4.6.0](https://github.com/opencv/opencv/releases/tag/4.6.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
Expand Down
60 changes: 60 additions & 0 deletions cmake/FindHALF.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
################################################################################
#
# MIT License
#
# Copyright (c) 2023 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
################################################################################
find_path(HALF_INCLUDE_DIRS
NAMES half/half.hpp
HINTS
$ENV{HALF_DIR}/include
$ENV{ROCM_PATH}/include
PATHS
${HALF_DIR}/include
/usr/include
/usr/local/include
${ROCM_PATH}/include
)
mark_as_advanced(HALF_INCLUDE_DIRS)

if(HALF_INCLUDE_DIRS)
set(HALF_FOUND TRUE)
endif( )

include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( HALF
FOUND_VAR HALF_FOUND
REQUIRED_VARS
HALF_INCLUDE_DIRS
)

set(HALF_FOUND ${HALF_FOUND} CACHE INTERNAL "")
set(HALF_INCLUDE_DIRS ${HALF_INCLUDE_DIRS} CACHE INTERNAL "")

if(HALF_FOUND)
message("-- ${White}Using HALF -- \n\tIncludes:${HALF_INCLUDE_DIRS}${ColourReset}")
else()
if(HALF_FIND_REQUIRED)
message(FATAL_ERROR "{Red}FindHALF -- NOT FOUND${ColourReset}")
endif()
message( "-- ${Yellow}NOTE: FindHALF failed to find -- half.hpp${ColourReset}" )
endif()
58 changes: 58 additions & 0 deletions cmake/FindStdFilesystem.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
################################################################################
#
# MIT License
#
# Copyright (c) 2023 Advanced Micro Devices, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
################################################################################
include(CheckCXXSourceCompiles)
include(CMakePushCheckState)

cmake_push_check_state(RESET)

set(CMAKE_REQUIRED_FLAGS "-std=c++17")

check_cxx_source_compiles("
#include <filesystem>
int main() {
std::filesystem::path p;
return 0;
}
" STD_FILESYSTEM_PRESENT)

cmake_pop_check_state()

if(NOT STD_FILESYSTEM_PRESENT)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_FLAGS "-std=c++17")

check_cxx_source_compiles("
#include <experimental/filesystem>
int main() {
std::experimental::filesystem::path p;
return 0;
}
" EXPERIMENTAL_FILESYSTEM_PRESENT)

cmake_pop_check_state()
endif()

set(FILESYSTEM_FOUND TRUE)
8 changes: 1 addition & 7 deletions docker/rocal-on-rhel-09.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,7 @@ RUN apt-get update -y && apt-get -y install autoconf automake libbz2-dev libssl-
git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd
RUN apt-get -y install sqlite3 libsqlite3-dev libtool build-essential && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 && tar xjvf boost_1_80_0.tar.bz2 && \
cd boost_1_80_0 && ./bootstrap.sh --prefix=/usr/local --with-python=python3 && \
./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" && \
sudo ./b2 install threading=multi link=shared --with-system --with-filesystem && \
./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
RUN apt-get -y install sqlite3 libsqlite3-dev libtool build-essential
RUN git clone -b v3.21.9 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive && \
./autogen.sh && ./configure && make -j8 && make check -j8 && sudo make install && sudo ldconfig && cd
RUN git clone -b 0.99 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
Expand Down
6 changes: 0 additions & 6 deletions docker/rocal-on-ubuntu-20-with-pytorch-with-mesa.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev
git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd ../../ && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && tar xjvf boost_1_72_0.tar.bz2 && \
cd boost_1_72_0 && ./bootstrap.sh --prefix=/usr/local --with-python=python3 && \
./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" && \
sudo ./b2 install threading=multi link=shared --with-system --with-filesystem && \
./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem && cd ../ && \
git clone -b 1.1.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
cmake -DBACKEND=HIP ../ && make -j4 && sudo make install && cd ../../ && \
git clone -b v3.12.4 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive && \
Expand Down
6 changes: 0 additions & 6 deletions docker/rocal-on-ubuntu-20.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev
git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd ../../ && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && tar xjvf boost_1_72_0.tar.bz2 && \
cd boost_1_72_0 && ./bootstrap.sh --prefix=/usr/local --with-python=python3 && \
./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" && \
sudo ./b2 install threading=multi link=shared --with-system --with-filesystem && \
./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem && cd ../ && \
git clone -b 1.1.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
cmake -DBACKEND=HIP ../ && make -j4 && sudo make install && cd ../../ && \
git clone -b v3.12.4 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive && \
Expand Down
8 changes: 1 addition & 7 deletions docker/rocal-on-ubuntu-22.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ RUN apt-get update -y && apt-get -y install autoconf automake libbz2-dev libssl-
git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd
RUN apt-get -y install sqlite3 libsqlite3-dev libtool build-essential && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.80.0/source/boost_1_80_0.tar.bz2 && tar xjvf boost_1_80_0.tar.bz2 && \
cd boost_1_80_0 && ./bootstrap.sh --prefix=/usr/local --with-python=python3 && \
./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" && \
sudo ./b2 install threading=multi link=shared --with-system --with-filesystem && \
./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
RUN apt-get -y install sqlite3 libsqlite3-dev libtool build-essential
RUN git clone -b v3.21.9 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive && \
./autogen.sh && ./configure && make -j8 && make check -j8 && sudo make install && sudo ldconfig && cd
RUN git clone -b 1.1.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
Expand Down
6 changes: 0 additions & 6 deletions docker/rocal-with-pytorch.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev
git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git && cd libjpeg-turbo && mkdir build && cd build && \
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo-2.0.3 \
-DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ../ && make -j4 && sudo make install && cd ../../ && \
wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 && tar xjvf boost_1_72_0.tar.bz2 && \
cd boost_1_72_0 && ./bootstrap.sh --prefix=/usr/local --with-python=python3 && \
./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" && \
sudo ./b2 install threading=multi link=shared --with-system --with-filesystem && \
./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem && cd ../ && \
git clone -b 1.1.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
cmake -DBACKEND=HIP ../ && make -j4 && sudo make install && cd ../../ && \
git clone -b v3.12.4 https://github.com/protocolbuffers/protobuf.git && cd protobuf && git submodule update --init --recursive && \
Expand Down
1 change: 0 additions & 1 deletion docs/user_guide/ch3.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ This chapter provides information about the installation of rocAL and related pa
* Linux distribution
* [AMD RPP](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp)
* [AMD OpenVX&trade;](https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/tree/master/amd_openvx) and AMD OpenVX&trade; Extensions: `VX_RPP` and `AMD Media`
* [Boost library](https://www.boost.org) - Version `1.72` or higher
* [Turbo JPEG](https://libjpeg-turbo.org/) - Version `2.0` or higher
* [Half-precision floating-point](https://half.sourceforge.net) library - Version `1.12.0` or higher
* [Google Protobuf](https://developers.google.com/protocol-buffers) - Version `3.12.4` or higher
Expand Down
32 changes: 8 additions & 24 deletions rocAL-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
help='OpenCV Version - optional (default:4.6.0)')
parser.add_argument('--protobuf', type=str, default='3.12.4',
help='ProtoBuf Version - optional (default:3.12.4)')
parser.add_argument('--rpp', type=str, default='1.2.0',
help='RPP Version - optional (default:1.2.0)')
parser.add_argument('--rpp', type=str, default='master',
help='RPP Version - optional (default:master)')
parser.add_argument('--mivisionx', type=str, default='master',
help='MIVisionX Version - optional (default:master)')
parser.add_argument('--pybind11', type=str, default='v2.10.4',
Expand Down Expand Up @@ -229,24 +229,6 @@
elif "SLES" in platfromInfo:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install sqlite3 sqlite3-devel libbz2-devel libopenssl-devel python3-devel autoconf automake libtool curl make gcc-c++ unzip')
# Boost V 1.72.0 from source
os.system(
'(cd '+deps_dir+'; wget https://boostorg.jfrog.io/artifactory/main/release/1.72.0/source/boost_1_72_0.tar.bz2 )')
os.system('(cd '+deps_dir+'; tar xjvf boost_1_72_0.tar.bz2 )')
if "centos-8" in platfromInfo or "redhat-8" in platfromInfo or "SLES" in platfromInfo:
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; ./bootstrap.sh --prefix=/usr/local --with-python=python36 )')
else:
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; ./bootstrap.sh --prefix=/usr/local --with-python=python3 )')
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; ./b2 stage -j16 threading=multi link=shared cxxflags="-std=c++11" )')
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; sudo ./b2 install threading=multi link=shared --with-system --with-filesystem)')
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; ./b2 stage -j16 threading=multi link=static cxxflags="-std=c++11 -fpic" cflags="-fpic" )')
os.system(
'(cd '+deps_dir+'/boost_1_72_0/; sudo ./b2 install threading=multi link=static --with-system --with-filesystem)')
# Install half.hpp
os.system(
'(cd '+deps_dir+'; wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip )')
Expand Down Expand Up @@ -324,10 +306,6 @@
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install jsoncpp-devel')
# boost
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install boost-devel')
# lmbd
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
Expand All @@ -344,6 +322,12 @@
linuxCMake+' -DBACKEND='+backend+' -DCMAKE_INSTALL_PREFIX='+ROCM_PATH+' ../; make -j4; sudo make install)')
# RapidJSON
os.system('sudo -v')
if "Ubuntu" in platfromInfo:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall + ' ' +
linuxSystemInstall_check+' install -y rapidjson-dev')
else:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall + ' ' +
linuxSystemInstall_check+' install -y rapidjson-devel')
os.system('(cd '+deps_dir+'; git clone https://github.com/Tencent/rapidjson.git; cd rapidjson; mkdir build; cd build; ' +
linuxCMake+' ../; make -j4; sudo make install)')
# PyBind11
Expand Down
Loading
Loading