Skip to content

Commit

Permalink
Deprecate - rocAL (#1304)
Browse files Browse the repository at this point in the history
* Deprecate - rocAL

* Docker - Updates

* Readme - Cleanup

* README.md - rocAL fix
  • Loading branch information
kiritigowda authored Mar 17, 2024
1 parent c8002cd commit 39c39be
Show file tree
Hide file tree
Showing 380 changed files with 32 additions and 49,963 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ generatedGDFs*
vision_report_Linux*
amd_opencv_test_results*
.DS_Store*
rocal_unittest_output_folder_*
rocal_unittest_log_file_*
doxygen_output*

# documentation artifacts
Expand Down
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ script:
# Level 4 - [MIOpenGEMM MIOpen ProtoBuf + Level 3] - CPU + OpenCL Components + OpenCV EXT + amd_media + Neural Net Components
- docker exec mivisionx-4 cmake -H/MIVisionX -B/_build -DCMAKE_BUILD_TYPE=Release
- docker exec mivisionx-4 cmake --build /_build --clean-first -- -j8
# Level 5 - [AMD_RPP rocAL Deps + Level 4] - CPU + OpenCL Components + OpenCV EXT + amd_media + Neural Net Components + rocAL
- docker exec mivisionx-5 cmake -H/MIVisionX -B/_build -DCMAKE_BUILD_TYPE=Release
- docker exec mivisionx-5 cmake --build /_build --clean-first -- -j8

after_success:
# code coverage tracking
Expand Down
16 changes: 0 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ endif(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# MIVisionX Default Options
option(ENHANCED_MESSAGE "MIVisionX Enhanced Message Option" ON)
option(NEURAL_NET "Build MIVisionX with Neural Net Support" ON)
option(ROCAL "Build MIVisionX with ROCAL Support" ON)
option(ROCAL_PYTHON "Build rocAL Python Package" ON)
option(LOOM "Build MIVisionX with LOOM Support" ON)
option(GPU_SUPPORT "Build MIVisionX with GPU Support" ON)
option(MIGRAPHX "Build MIVisionX with MIGraphX Support" ON)
Expand Down Expand Up @@ -82,7 +80,6 @@ message("-- ${BoldBlue}MIVisionX Install Path -- ${CMAKE_INSTALL_PREFIX}${Colour
if(APPLE)
set(CMAKE_MACOSX_RPATH 1)
set(GPU_SUPPORT OFF)
set(ROCAL OFF)
set(BACKEND "CPU")
message("-- ${Magenta}Apple macOS Detected -- GPU Support turned OFF${ColourReset}")
endif()
Expand Down Expand Up @@ -125,8 +122,6 @@ message("-- ${BoldBlue}MIVisionX Build Type -- ${CMAKE_BUILD_TYPE}${ColourReset}

message("-- ${Cyan}MIVisionX Developer Options${ColourReset}")
message("-- ${Cyan} -D NEURAL_NET=${NEURAL_NET} [Turn ON/OFF Neural Net Modules (default:ON)]${ColourReset}")
message("-- ${Cyan} -D ROCAL=${ROCAL} [Turn ON/OFF ROCAL Modules (default:ON)]${ColourReset}")
message("-- ${Cyan} -D ROCAL_PYTHON=${ROCAL_PYTHON} [Turn ON/OFF ROCAL Modules (default:ON)]${ColourReset}")
message("-- ${Cyan} -D LOOM=${LOOM} [Turn ON/OFF LOOM Modules (default:ON)]${ColourReset}")
message("-- ${Cyan} -D GPU_SUPPORT=${GPU_SUPPORT} [Turn ON/OFF GPU support (default:ON)]${ColourReset}")
message("-- ${Cyan} -D MIGRAPHX=${MIGRAPHX} [Turn ON/OFF MIGraphX Module (default:ON)]${ColourReset}")
Expand All @@ -147,17 +142,6 @@ add_subdirectory(amd_openvx)
add_subdirectory(amd_openvx_extensions)
add_subdirectory(utilities)

if(ROCAL)
add_subdirectory(rocAL)
if(ROCAL_PYTHON)
add_subdirectory(rocAL/rocAL_pybind)
else()
message("-- ${Cyan}ROCAL Python Module turned OFF by user option -D ROCAL_PYTHON=OFF ${ColourReset}")
endif()
else()
message("-- ${Cyan}ROCAL Module turned OFF by user option -D ROCAL=OFF ${ColourReset}")
endif()

enable_testing()
include(CTest)
add_subdirectory(tests)
Expand Down
102 changes: 9 additions & 93 deletions 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.6.1"
__version__ = "2.7.0"
__maintainer__ = "Kiriti Nagesh Gowda"
__email__ = "[email protected]"
__status__ = "Shipping"
Expand All @@ -51,8 +51,8 @@
help='MIVisionX Neural Net Dependency Install - optional (default:ON) [options:ON/OFF]')
parser.add_argument('--inference', type=str, default='ON',
help='MIVisionX Neural Net Inference Dependency Install - optional (default:ON) [options:ON/OFF]')
parser.add_argument('--rocal', type=str, default='ON',
help='MIVisionX rocAL Dependency Install - optional (default:ON) [options:ON/OFF]')
parser.add_argument('--amd_rpp', type=str, default='ON',
help='MIVisionX amd_rpp Dependency Install - optional (default:ON) [options:ON/OFF]')
parser.add_argument('--developer', type=str, default='OFF',
help='Setup Developer Options - optional (default:OFF) [options:ON/OFF]')
parser.add_argument('--reinstall', type=str, default='OFF',
Expand All @@ -70,7 +70,7 @@
ffmpegInstall = args.ffmpeg.upper()
neuralNetInstall = args.neural_net.upper()
inferenceInstall = args.inference.upper()
rocalInstall = args.rocal.upper()
amdRPPInstall = args.amd_rpp.upper()
developerInstall = args.developer.upper()
reinstall = args.reinstall.upper()
backend = args.backend.upper()
Expand All @@ -95,7 +95,7 @@
"ERROR: Inference Install Option Not Supported - [Supported Options: OFF or ON]\n")
parser.print_help()
exit()
if rocalInstall not in ('OFF', 'ON'):
if amdRPPInstall not in ('OFF', 'ON'):
print(
"ERROR: Neural Net Install Option Not Supported - [Supported Options: OFF or ON]\n")
parser.print_help()
Expand Down Expand Up @@ -200,11 +200,6 @@
# Re-Install
if os.path.exists(deps_dir):
print("\nMIVisionX Setup: Re-Installing Libraries from -- "+deps_dir+"\n")
# opencv
if os.path.exists(deps_dir+'/build/OpenCV'):
os.system('sudo -v')
os.system('(cd '+deps_dir+'/build/OpenCV; sudo ' +
linuxFlag+' make install -j8)')

if neuralNetInstall == 'ON':
os.system('sudo -v')
Expand All @@ -216,14 +211,7 @@
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y half rocblas-devel miopen-hip-devel migraphx-devel')

if (rocalInstall == 'ON' or neuralNetInstall == 'ON'):
# ProtoBuf
if os.path.exists(deps_dir+'/protobuf-'+ProtoBufVersion):
os.system('sudo -v')
os.system('(cd '+deps_dir+'/protobuf-'+ProtoBufVersion +
'; sudo '+linuxFlag+' make install -j8)')

if rocalInstall == 'ON':
if amdRPPInstall == 'ON':
# RPP
if "Ubuntu" in platfromInfo:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
Expand All @@ -232,13 +220,6 @@
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y rpp rpp-devel')

if ffmpegInstall == 'ON':
# FFMPEG
if os.path.exists(deps_dir+'/FFmpeg-n4.4.2'):
os.system('sudo -v')
os.system('(cd '+deps_dir+'/FFmpeg-n4.4.2; sudo ' +
linuxFlag+' make install -j8)')

print("\nMIVisionX Dependencies Re-Installed with MIVisionX-setup.py V-"+__version__+"\n")
exit()

Expand All @@ -257,16 +238,12 @@
os.system(
'(cd '+deps_dir+'; wget https://github.com/opencv/opencv/archive/'+opencvVersion+'.zip )')
os.system('(cd '+deps_dir+'; unzip '+opencvVersion+'.zip )')
if (rocalInstall == 'ON' or neuralNetInstall == 'ON'):
os.system(
'(cd '+deps_dir+'; wget https://github.com/protocolbuffers/protobuf/archive/v'+ProtoBufVersion+'.zip )')
os.system('(cd '+deps_dir+'; unzip v'+ProtoBufVersion+'.zip )')
if ffmpegInstall == 'ON':
os.system(
'(cd '+deps_dir+'; wget https://github.com/FFmpeg/FFmpeg/archive/refs/tags/n4.4.2.zip && unzip n4.4.2.zip )')

# Install
if (rocalInstall == 'ON' or neuralNetInstall == 'ON'):
if (amdRPPInstall == 'ON' or neuralNetInstall == 'ON'):
# package dependencies
os.system('sudo -v')
if "centos" in platfromInfo or "redhat" in platfromInfo:
Expand All @@ -288,20 +265,6 @@
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y half')
# Install ProtoBuf
os.system('(cd '+deps_dir+'/protobuf-' +
ProtoBufVersion+'; ./autogen.sh )')
os.system('(cd '+deps_dir+'/protobuf-' +
ProtoBufVersion+'; ./configure )')
os.system('(cd '+deps_dir+'/protobuf-'+ProtoBufVersion+'; make -j8 )')
os.system('(cd '+deps_dir+'/protobuf-' +
ProtoBufVersion+'; make check -j8 )')
os.system('sudo -v')
os.system('(cd '+deps_dir+'/protobuf-'+ProtoBufVersion +
'; sudo '+linuxFlag+' make install )')
os.system('sudo -v')
os.system('(cd '+deps_dir+'/protobuf-'+ProtoBufVersion +
'; sudo '+linuxFlag+' ldconfig )')

if neuralNetInstall == 'ON':
if backend == 'HIP':
Expand All @@ -317,6 +280,7 @@
else:
print(
"\nSTATUS: MIVisionX Setup: Neural Network only supported with HIP backend\n")
exit(-1)

# Install Model Compiler Deps
if inferenceInstall == 'ON':
Expand Down Expand Up @@ -395,63 +359,15 @@
os.system('sudo -v')
os.system('(cd '+deps_dir+'/build/OpenCV; sudo '+linuxFlag+' ldconfig )')

if rocalInstall == 'ON':
if amdRPPInstall == 'ON':
# Install RPP
# clang
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install clang')
if "SLES" in platfromInfo:
os.system('sudo -v')
os.system(
'sudo update-alternatives --install /usr/bin/clang clang /opt/rocm-*/llvm/bin/clang 100')
os.system(
'sudo update-alternatives --install /usr/bin/clang++ clang++ /opt/rocm-*/llvm/bin/clang++ 100')
# OS Deps
if "Ubuntu" in platfromInfo:
# Install Packages for rocAL
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install libgflags-dev libgoogle-glog-dev liblmdb-dev')
# Yasm/Nasm for TurboJPEG
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install nasm yasm')
elif "redhat" in platfromInfo or "SLES" in platfromInfo:
# Nasm & Yasm
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install nasm yasm')
# JSON-cpp
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install jsoncpp-devel')
# lmbd
os.system('sudo -v')
os.system('sudo '+linuxFlag+' '+linuxSystemInstall+' ' +
linuxSystemInstall_check+' install lmdb-devel')
# turbo-JPEG - https://github.com/rrawther/libjpeg-turbo.git -- 2.0.6.2
os.system(
'(cd '+deps_dir+'; git clone -b 2.0.6.2 https://github.com/rrawther/libjpeg-turbo.git )')
os.system('(cd '+deps_dir+'/libjpeg-turbo; mkdir build; cd build; '+linuxCMake +
' -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RELEASE -DENABLE_STATIC=FALSE -DCMAKE_INSTALL_DEFAULT_LIBDIR=lib ..; make -j 4; sudo make install )')
# RPP
os.system('sudo -v')
if "Ubuntu" in platfromInfo:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y rpp rpp-dev')
else:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y rpp rpp-devel')
# 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==7.3.1')
os.system('(cd '+deps_dir+'; git clone -b '+pybind11Version+' https://github.com/pybind/pybind11; cd pybind11; mkdir build; cd build; ' +
linuxCMake+' -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON ../; make -j4; sudo make install)')

# Install ffmpeg
if ffmpegInstall == 'ON':
Expand Down
Loading

0 comments on commit 39c39be

Please sign in to comment.