Skip to content

Commit

Permalink
CuPy - Setup.py support updates (#1259)
Browse files Browse the repository at this point in the history
* CuPy - Setup.py support updates

* CuPy - Updates
  • Loading branch information
kiritigowda authored Dec 28, 2023
1 parent 3e0e7e4 commit da54abf
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 24 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Documentation for MIVisionX is available at
* Setup Updates
* RPP - Use package install
* Dockerfiles: Updates & bugfix
* CuPy - No longer installed with setup.py

### Fixes

Expand All @@ -47,7 +48,7 @@ Documentation for MIVisionX is available at
* RPP - [1.5.0]
* FFMPEG - [n4.4.2](https://github.com/FFmpeg/FFmpeg/releases/tag/n4.4.2)
* Dependencies for all preceding packages
* MIVisionX setup script - `V2.6.0`
* MIVisionX setup script - `V2.6.1`

### Known issues

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ endif()
if(APPLE)
set(CPACK_GENERATOR "Bundle")
set(CPACK_BUNDLE_NAME "${PROJECT_NAME}")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/.github/info.plist")
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/docs/data/MIVisionX.bmp")
set(CPACK_BUNDLE_PLIST "${CMAKE_SOURCE_DIR}/.github/info.plist")
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/docs/data/MIVisionX.bmp")
else()
set(CPACK_GENERATOR "TGZ;ZIP")
if(EXISTS ${MAKE_NSIS_EXE})
Expand Down
16 changes: 1 addition & 15 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.0"
__version__ = "2.6.1"
__maintainer__ = "Kiriti Nagesh Gowda"
__email__ = "[email protected]"
__status__ = "Shipping"
Expand Down Expand Up @@ -452,20 +452,6 @@
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)')
# CuPy Install
os.system('sudo -v')
os.system(linuxSystemInstall+' update')
os.system('pip install scipy==1.9.3 cython==0.29.*')
os.system('pip install git+https://github.com/ROCmSoftwarePlatform/hipify_torch.git')
if "Ubuntu" in platfromInfo:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y git g++ hipblas hipsparse rocrand hipfft rocfft rocthrust-dev hipcub-dev python3-dev')
else:
os.system('sudo '+linuxFlag+' '+linuxSystemInstall +
' '+linuxSystemInstall_check+' install -y git g++ hipblas hipsparse rocrand hipfft rocfft rocthrust-devel hipcub-devel python3-devel')
os.system('sudo -v')
os.system('(cd '+deps_dir+'; git clone -b rocm6.0_internal_testing https://github.com/ROCmSoftwarePlatform/cupy.git; export CUPY_INSTALL_USE_HIP=1; export ROCM_HOME=/opt/rocm; cd cupy; git submodule update --init; pip install -e . --no-cache-dir -vvvv)')
os.system('pip install numpy==1.21')

# Install ffmpeg
if ffmpegInstall == 'ON':
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ Review all notable [changes](CHANGELOG.md#changelog) with the latest release
* RPP - [1.5.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.6.0`
* MIVisionX Setup Script - `V2.6.1`
### Known issues
Expand Down
18 changes: 13 additions & 5 deletions rocAL/rocAL_pybind/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,28 @@ written primarily in C/C++ language can be used effectively in Python.

## Prerequisites
* [rocAL C/C++ Library](../rocAL/README.md#prerequisites)
* CMake Version 3.10 or higher
* Python 3
* PIP3 - `sudo apt install python3-pip`
* CMake Version `3.5` or higher
* Python Version `3`
* PIP3
* PIP3 Packages - `numpy`, `opencv-python`, `torch`
* [CuPy for rocm](https://github.com/ROCmSoftwarePlatform/cupy)

## Install
## rocal_pybind install

rocAL_pybind installs during [MIVisionX build](https://github.com/ROCm/MIVisionX#build--install-mivisionx)

#### Prerequisites
#### Prerequisites install to run test scripts

* Install PIP3
+ Ubuntu 20/22
```
sudo apt install python3-pip
```
* Install pip packages
````
pip3 install numpy opencv-python torch
````
* Install `CuPy` for `ROCm` - `https://github.com/ROCmSoftwarePlatform/cupy`
#### Run Test Scripts
* Test scripts and instructions to run them can be found [here](examples/)

0 comments on commit da54abf

Please sign in to comment.