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

Develop - Merge to master #1117

Merged
merged 5 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
### Changed

* rocAL - PyBind Link to prebuilt library
+ PyBind11
+ RapidJSON
* Setup Updates

### Fixed
Expand All @@ -42,7 +44,7 @@
* RPP - [1.0.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.0.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V2.5.0`
* MIVisionX Setup Script - `V2.5.1`

### Known issues

Expand Down
6 changes: 5 additions & 1 deletion MIVisionX-setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
__author__ = "Kiriti Nagesh Gowda"
__copyright__ = "Copyright 2018 - 2023, AMD ROCm MIVisionX"
__license__ = "MIT"
__version__ = "2.5.0"
__version__ = "2.5.1"
__maintainer__ = "Kiriti Nagesh Gowda"
__email__ = "mivisionx.support@amd.com"
__status__ = "Shipping"
Expand Down Expand Up @@ -474,6 +474,10 @@
os.system('sudo -v')
os.system('(cd '+deps_dir+'; git clone -b '+rppVersion+' https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git; cd rpp; mkdir build-'+backend+'; cd build-'+backend+'; ' +
linuxCMake+' -DBACKEND='+backend+' -DCMAKE_INSTALL_PREFIX='+ROCM_PATH+' ../; make -j4; sudo make install)')
# RapidJSON
os.system('sudo -v')
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
os.system('sudo -v')
os.system('pip install pytest==3.1')
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
```
mkdir build-hip
cd build-hip
sudo cmake ../
sudo make -j8
cmake ../
make -j8
sudo cmake --build . --target PyPackageInstall
sudo make install
```
Expand All @@ -298,9 +298,8 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
```
mkdir build-ocl
cd build-ocl
sudo cmake -DBACKEND=OPENCL ../
sudo make -j8
sudo cmake --build . --target PyPackageInstall
cmake -DBACKEND=OPENCL ../
make -j8
sudo make install
```

Expand All @@ -309,7 +308,7 @@ macOS [build instructions](https://github.com/GPUOpen-ProfessionalCompute-Librar
if an app interested in installing MIVisionX with both GPU backends, then add **-DCMAKE_INSTALL_PREFIX** in the cmake
commands to install MIVisionX with OPENCL and HIP backends into two separate custom folders.
+ vx_winml is not supported on Linux
+ ```PyPackageInstall``` used for rocal_pybind installation
+ ```PyPackageInstall``` used for rocal_pybind installation - supported only with HIP Backend
+ rocal_pybind not supported on windows
+ `sudo` required for pybind installation

Expand Down Expand Up @@ -466,7 +465,7 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
* RPP - [1.1.0](https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp/releases/tag/1.1.0)
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all the above packages
* MIVisionX Setup Script - `V2.5.0`
* MIVisionX Setup Script - `V2.5.1`

### Known issues

Expand Down
91 changes: 91 additions & 0 deletions amd_openvx/cmake/FindLMDB.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
################################################################################
#
# MIT License
#
# Copyright (c) 2017 - 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(LMDB_INCLUDE_DIRS
NAMES lmdb.h
HINTS
$ENV{LMDB_DIR}/include
PATHS
${LMDB_DIR}/include
/usr/include
/usr/local/include
)
mark_as_advanced(LMDB_INCLUDE_DIRS)

find_library(LMDB_LIBRARIES
NAMES lmdb
HINTS
$ENV{LMDB_DIR}/lib
$ENV{LMDB_DIR}/lib64
PATHS
${LMDB_DIR}/lib
${LMDB_DIR}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
mark_as_advanced(LMDB_LIBRARIES)

find_path(LMDB_LIBRARIES_DIRS
NAMES lmdb
HINTS
$ENV{LMDB_DIR}/lib
$ENV{LMDB_DIR}/lib64
PATHS
${LMDB_DIR}/lib
${LMDB_DIR}/lib64
/usr/local/lib
/usr/local/lib64
/usr/lib
/usr/lib64
)
mark_as_advanced(LMDB_LIBRARIES_DIRS)

if(LMDB_LIBRARIES AND LMDB_INCLUDE_DIRS)
set(LMDB_FOUND TRUE)
endif( )

include( FindPackageHandleStandardArgs )
find_package_handle_standard_args( LMDB
FOUND_VAR LMDB_FOUND
REQUIRED_VARS
LMDB_LIBRARIES
LMDB_INCLUDE_DIRS
)

set(LMDB_FOUND ${LMDB_FOUND} CACHE INTERNAL "")
set(LMDB_LIBRARIES ${LMDB_LIBRARIES} CACHE INTERNAL "")
set(LMDB_INCLUDE_DIRS ${LMDB_INCLUDE_DIRS} CACHE INTERNAL "")
set(LMDB_LIBRARIES_DIRS ${LMDB_LIBRARIES_DIRS} CACHE INTERNAL "")

if(LMDB_FOUND)
message("-- ${White}Using LMDB -- \n\tLibraries:${LMDB_LIBRARIES} \n\tIncludes:${LMDB_INCLUDE_DIRS}${ColourReset}")
else()
if(LMDB_FIND_REQUIRED)
message(FATAL_ERROR "{Red}FindLMDB -- NOT FOUND${ColourReset}")
endif()
message( "-- ${Yellow}NOTE: FindLMDB failed to find -- LMDB${ColourReset}" )
endif()
2 changes: 1 addition & 1 deletion docker/archive/mivisionx-opencl-on-ubuntu20.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
git clone -b 1.1.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
cmake -DBACKEND=OCL ../ && 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 && \
./autogen.sh && ./configure && make -j8 && make check -j8 && sudo make install && sudo ldconfig && cd
Expand Down
2 changes: 1 addition & 1 deletion docker/linux/mivisionx-on-rhel-8.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN yum -y install sqlite-devel libtool && yum -y groupinstall 'Development Tool
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
RUN 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

ENV MIVISIONX_WORKSPACE=/workspace
Expand Down
2 changes: 1 addition & 1 deletion docker/linux/mivisionx-on-rhel-9.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN yum -y install sqlite-devel libtool && yum -y groupinstall 'Development Tool
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
RUN 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

ENV MIVISIONX_WORKSPACE=/workspace
Expand Down
2 changes: 1 addition & 1 deletion docker/linux/mivisionx-on-sles-15.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN zypper -n install sqlite-devel libtool && zypper -n install -t pattern devel
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
RUN 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

ENV MIVISIONX_WORKSPACE=/workspace
Expand Down
15 changes: 12 additions & 3 deletions docker/mivisionx-on-ubuntu20.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-de
sudo apt-get update -y && \
sudo amdgpu-install -y --usecase=graphics,rocm
# install OpenCV & FFMPEG - Level 3
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python-dev python-numpy \
libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev unzip && \
mkdir OpenCV && cd OpenCV && wget https://github.com/opencv/opencv/archive/4.6.0.zip && unzip 4.6.0.zip && \
Expand All @@ -25,14 +26,15 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf automake build-es
libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev \
nasm yasm libx264-dev libx265-dev libnuma-dev libfdk-aac-dev && \
wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.4.2.zip && unzip n4.4.2.zip && cd FFmpeg-n4.4.2/ && sudo ldconfig && \
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" && \
./configure --enable-shared --disable-static --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libass --enable-gpl --enable-nonfree && \
make -j8 && sudo make install && cd
# install MIVisionX neural net dependency - Level 4
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install miopen-hip migraphx && \
mkdir neuralNet && cd neuralNet && wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip && \
unzip half-1.12.0.zip -d half-files && sudo mkdir -p /usr/local/include/half && sudo cp half-files/include/half.hpp /usr/local/include/half && cd
# install MIVisionX rocAL dependency - Level 5
ENV CUPY_INSTALL_USE_HIP=1
ENV ROCM_HOME=/opt/rocm
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev python-dev python3-dev libgflags-dev libgoogle-glog-dev liblmdb-dev nasm yasm libjsoncpp-dev clang && \
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 \
Expand All @@ -43,14 +45,21 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install wget libbz2-dev libssl-dev
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
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 && \
./autogen.sh && ./configure && make -j8 && make check -j8 && sudo make install && sudo ldconfig && cd
RUN git clone https://github.com/Tencent/rapidjson.git && cd rapidjson && mkdir build && cd build && \
cmake ../ && make -j4 && sudo make install && cd ../../ && \
pip install pytest==3.1 && git clone -b https://github.com/pybind/pybind11 && cd pybind11 && mkdir build && cd build && \
cmake -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON ../ && make -j4 && sudo make install && cd ../../ && \
DEBIAN_FRONTEND=noninteractive apt-get -y install git g++ hipblas hipsparse rocrand hipfft rocfft rocthrust-dev hipcub-dev python3-dev && \
git clone https://github.com/ROCmSoftwarePlatform/cupy.git && cd cupy && git submodule update --init && \
pip install -e . --no-cache-dir -vvvv && pip install numpy==1.21 && cd

ENV MIVISIONX_WORKSPACE=/workspace
WORKDIR $MIVISIONX_WORKSPACE

# Clone MIVisionX
RUN git clone https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX.git && \
mkdir build && cd build && cmake -DBACKEND=HIP ../MIVisionX && make -j8 && make install
mkdir build && cd build && cmake -DBACKEND=HIP ../MIVisionX && make -j8 && make install
13 changes: 11 additions & 2 deletions docker/mivisionx-on-ubuntu22.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install initramfs-tools libnuma-de
sudo amdgpu-install -y --usecase=graphics,rocm

# install OpenCV & FFMPEG - Level 3
ENV PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev python3-dev python3-numpy \
libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-dev unzip && \
mkdir OpenCV && cd OpenCV && wget https://github.com/opencv/opencv/archive/4.6.0.zip && unzip 4.6.0.zip && \
Expand All @@ -27,14 +28,15 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get -y install autoconf automake build-es
libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev \
nasm yasm libx264-dev libx265-dev libnuma-dev libfdk-aac-dev && \
wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.4.2.zip && unzip n4.4.2.zip && cd FFmpeg-n4.4.2/ && sudo ldconfig && \
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" && \
./configure --enable-shared --disable-static --enable-libx264 --enable-libx265 --enable-libfdk-aac --enable-libass --enable-gpl --enable-nonfree && \
make -j8 && sudo make install && cd

# install MIVisionX neural net dependency - Level 4
RUN apt-get -y install rocblas rocblas-dev miopen-hip miopen-hip-dev migraphx

# install MIVisionX rocAL dependency - Level 5
ENV CUPY_INSTALL_USE_HIP=1
ENV ROCM_HOME=/opt/rocm
RUN apt-get -y install curl make g++ unzip libomp-dev libpthread-stubs0-dev wget clang
RUN mkdir rocAL_deps && cd rocAL_deps && wget https://sourceforge.net/projects/half/files/half/1.12.0/half-1.12.0.zip && \
unzip half-1.12.0.zip -d half-files && sudo mkdir -p /usr/local/include/half && sudo cp half-files/include/half.hpp /usr/local/include/half && cd
Expand All @@ -51,8 +53,15 @@ RUN apt-get -y install sqlite3 libsqlite3-dev libtool build-essential && \
sudo ./b2 install threading=multi link=static --with-system --with-filesystem
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.0.0 https://github.com/GPUOpen-ProfessionalCompute-Libraries/rpp.git && cd rpp && mkdir build && cd build && \
RUN 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
RUN git clone https://github.com/Tencent/rapidjson.git && cd rapidjson && mkdir build && cd build && \
cmake ../ && make -j4 && sudo make install && cd ../../ && \
pip install pytest==3.1 && git clone -b https://github.com/pybind/pybind11 && cd pybind11 && mkdir build && cd build && \
cmake -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON ../ && make -j4 && sudo make install && cd ../../ && \
DEBIAN_FRONTEND=noninteractive apt-get -y install git g++ hipblas hipsparse rocrand hipfft rocfft rocthrust-dev hipcub-dev python3-dev && \
git clone https://github.com/ROCmSoftwarePlatform/cupy.git && cd cupy && git submodule update --init && \
pip install -e . --no-cache-dir -vvvv && pip install numpy==1.21

ENV MIVISIONX_WORKSPACE=/workspace
WORKDIR $MIVISIONX_WORKSPACE
Expand Down
Loading