Skip to content

Commit

Permalink
rocAL - performance PR (#1060)
Browse files Browse the repository at this point in the history
* Changes wrt Resizeshorter.[rocAL]

* Adding changes for Image Classification training convergence

* Resolving internal review comments

* Video Reader Python API change (#1033)

* Fix Video Reader Resize Python end

* Fix Video Reader Resize Python end

* Adjust spacing

---------

Co-authored-by: root <root@ixt-sjc2-52.local.lan>

* rocAL - adding generic plugin for GPU support  (#1034)

* Linux - Distro Docker Support (#1027)

* Linux - Distro Docker Support

* LinuX Dockers - RHEL 8 Fix

* Test - Updates

* rocAL - cmn fix (#1024)

* rocAL: Classification Training Related changes (#1001)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* Add API to get reader config and decoder config

* Add API to obtain max and min aspect ratio from image source evaluator

* Add scaling modes support

Add support to pass the resize scaling modes
Add support to calculate the normalized crop

* Minor change

* Remove crop parameters and related changes for resize

* Fix segmentation fault

* Fix error with resize modes

* MInor fix : update tensor ROI

* Minor fix - center crop

* Update the python API for resize with scaling modes and interpolation param

* Minor changes

* Minor changes

* Minor change

* Remove center crop related changes

* Remove redundant max size check

* Remove crop param from node resize

* Remove source evaluator

* Minor fix

* Remove the get decoder and reader config API

* Remove aspect ratio calculations in source evaluator

* Remove decoder and reader config variables

Remove crop related changes

* Remove decoder and reader config variables

Remove crop related changes

* Minor fix for max size

* Code clean up

* Minor change

* Minor changes

* Minor changes

* Minor change

* Fix python codacy warnings

* Minor codacy fix

* Revert "Minor codacy fix"

This reverts commit df1dd28427e5e133f23247c0dcece744e9ebf5b1.

* Minor change

* Minor code changes

* Remove API to get max width and height for resize node

* Minor fix

* Minor changes

* Working Image Classification Chnages

* Working Image Classification USER GIVEN PARAMS

* Add changes in types.py

* 1. Code clean up
2. Centre Crop bug fix

* Code Clean Up

* Add centre_crop changes

* ResizeTensor addition

* Minor changes in PR

* ResizeTensor.cpp - Removing OpenCL backend support

* Code Clean Up

* Resolving internal PR comments

* Resolve the internal review comments -2

* Reesolve build error

* runVisionTest - add a new test (#979)

* rocAL PyBind - Wheel Package Fix (#982)

Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>

* amd media - device support (#983)

* amd_media decoder add parameter for passing deviceid

* minor cleanup

* fix for review comments

* docker update - rpp version update (#986)

* Update mivisionx-with-pytorch.dockerfile

* Update mivisionx-with-tensorflow.dockerfile

* Update level-5.dockerfile

* Update mivisionx-on-ubuntu20.dockerfile

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* rocal - README updates and directory name change (#981)

* Update README.md

* Update README.md

* folder name change

* Update README.md

* Delete PYTHON_UNITTEST_TEST_FILE.sh

* Delete rocAL/rocAL_pybind/example/new_api directory

* Update README.md

* Update README.md

* Update README.md

* Create README.md

* added new random_crop_dec parameter class

* Set the crop values to partial decoder. [rocAL]

* Fix undefined reference error in random number generator. [rocAL]

* Change parameters for rocalFusedCropDecoder wrt new randomgenrator changes. [rocAL]
Remove unused paramaters.

* Clean up wrt Random number generator. [rocAl]

* Convert double to float for aspect ration and random area parameters in fused crop. [rocAL]

* Set seed for every batch in paramater random crop. [rocAL]

* Clean up. [rocAL]

* Fix Bug with seed generation for RNG

* rocAL - hardware decoder python support (#987)

* rocAL - removing references (#954)

* rocAL - Tf pets training  (#947)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* tf_pets_v2

* code_cleanup

* minor code cleanup

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* PyTorch docker file - add argument for specifying version (#938)

* add argument for specifying pytorch version for building docker file

* add readme for pytorch

* rocAL - Fix ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED (#940)

* Docker - codacy fix for pr937 (#942)

* rocAL - Adding NCHW FP16 SIMD kernel (#926)

* Adding NCHW FP16 SIMD kernel for normalization and buffer copy

* Fixed some codestyle issues with FP16 kernel

* Using FMA SSE instruction for multiply-add ops

* Removed extra spaces

* Adding fma flag to rocAL CMakeLists

* Adding FP16 intrinsics for buffer copies

* Setting rounding mode to _MM_FROUND_TO_ZERO

* rocAL  - README updates for video unit test (#939)

* Add README support for video unit test

* Update Readme for video unit test

* Minor test_suite fix

* Update video unit test Readme

* Update Readme

* Updated README with the explation of test cases and arguments

* Minor fix

* Add test case samples to video unit test README

Also add images for README

* Modify sample images

* Change sample image dimension

* Minor README changes

* Minor README changes

* Minor change

* Minor fix to handle relative input path in video unit test

* Resolve codacy warnings

* Minor change

* Add correct video reader outputs

* MIVisionX - cmake cleanup (#943)

* OpenCV EXT - Updates & Tests (#944)

* OpenCV - Readme updates

* Updates - Readme & Tests

* OpenCV - Tests Added

* Updates

* ZenDNN - model compiler (#941)

* model compiler - zendnn - mnist layers

* bug fix + lrn

* layers: batch norm, sum ; bug fixes

* fixes lgtm errors

* bug fixes

* codacy fixes

* bug fix

* codacy fixes

* Update train_withROCAL_withTFRecordReader.py

* Resolved PR comments

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* rocAL - fix bug in the usage of GetImageName (#955)

* fix bug in the usage of GetImageName

* add ground-truth labels .txt file for tinydataset

* rename file to all smaller case

* AMD - OpenVX Float16 Support (#956)

* AMD - Float16 Support

* Remove redundant def

* OpenVX FP16 - CPP FP16 support

* AMD Media Decoder - Measure Decode Time (#964)

* added what Aryan recommended to decoder performance measure code

* added transfer time measure

* rocAL - Changing Python Lib Path (#959)

* Changing Python Lib Path

* Keep the checks for different env intact

Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>

* MIVisionX - CMakeList Updates (#967)

* CMakeList Updates

* CMakeList - Cleanup

* Setup - Updates

* rocAL - CMakeList Cleanup

* rocAL - Resize scaling modes support (#950)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* Add API to get reader config and decoder config

* Add API to obtain max and min aspect ratio from image source evaluator

* Add scaling modes support

Add support to pass the resize scaling modes
Add support to calculate the normalized crop

* Minor change

* Remove crop parameters and related changes for resize

* Fix segmentation fault

* Fix error with resize modes

* MInor fix : update tensor ROI

* Minor fix - center crop

* Update the python API for resize with scaling modes and interpolation param

* Minor changes

* Minor changes

* Minor change

* Remove center crop related changes

* Remove redundant max size check

* Remove crop param from node resize

* Remove source evaluator

* Minor fix

* Remove the get decoder and reader config API

* Remove aspect ratio calculations in source evaluator

* Remove decoder and reader config variables

Remove crop related changes

* Remove decoder and reader config variables

Remove crop related changes

* Minor fix for max size

* Code clean up

* Minor change

* Minor changes

* Minor changes

* Minor change

* Fix python codacy warnings

* Minor codacy fix

* Revert "Minor codacy fix"

This reverts commit df1dd28427e5e133f23247c0dcece744e9ebf5b1.

* Minor change

* Minor code changes

* Remove API to get max width and height for resize node

* Resize ROI changes

* Code cleanup

* Rename variables

* Code cleanup

* MInor changes

* Minor change

* Minor fix

* Minor changes

* Modify logic to calculate max size for each mode

* Fix  max_size calculation algorithm

* Fix max_size calculation logic

* Minor changes

* Minor change

* Add space after if

* Minor change

* Minor changes

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>

* rocAL - fix for copy-write violation (#968)

* fix for copywrite violation

* fix for review comments and other clean_up

* minor clean_up

* revert run.sh changes

* fix codacy warnings

* add jupyter notebook for decoder

* rocAL - add missing header (#972)

* rocAL - add missing header

* Tested Config Updates

* OpenVX Framework - update max tensor dims to 6 (#970)

* add pipeline decorator for rocal

* fix build error

* fix script for jupyter notebook

* changes to Jupyter notebook to support HW decoder

* fixed review comments

* hardcoding decoder device to cpu for python unit tests

* add option for decoder.py to run on gpu/cpu

Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>

* Fix Python build

* Wrap long lines of code

* Fix spacing & add copyright in pybind

* amd-openvx-hip: create a separate stream for graph (#996)

* rocAL -  CMake and header files Clean up (#991)

* rocAL - removing references (#954)

* rocAL - Tf pets training  (#947)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* tf_pets_v2

* code_cleanup

* minor code cleanup

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* PyTorch docker file - add argument for specifying version (#938)

* add argument for specifying pytorch version for building docker file

* add readme for pytorch

* rocAL - Fix ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED (#940)

* Docker - codacy fix for pr937 (#942)

* rocAL - Adding NCHW FP16 SIMD kernel (#926)

* Adding NCHW FP16 SIMD kernel for normalization and buffer copy

* Fixed some codestyle issues with FP16 kernel

* Using FMA SSE instruction for multiply-add ops

* Removed extra spaces

* Adding fma flag to rocAL CMakeLists

* Adding FP16 intrinsics for buffer copies

* Setting rounding mode to _MM_FROUND_TO_ZERO

* rocAL  - README updates for video unit test (#939)

* Add README support for video unit test

* Update Readme for video unit test

* Minor test_suite fix

* Update video unit test Readme

* Update Readme

* Updated README with the explation of test cases and arguments

* Minor fix

* Add test case samples to video unit test README

Also add images for README

* Modify sample images

* Change sample image dimension

* Minor README changes

* Minor README changes

* Minor change

* Minor fix to handle relative input path in video unit test

* Resolve codacy warnings

* Minor change

* Add correct video reader outputs

* MIVisionX - cmake cleanup (#943)

* OpenCV EXT - Updates & Tests (#944)

* OpenCV - Readme updates

* Updates - Readme & Tests

* OpenCV - Tests Added

* Updates

* ZenDNN - model compiler (#941)

* model compiler - zendnn - mnist layers

* bug fix + lrn

* layers: batch norm, sum ; bug fixes

* fixes lgtm errors

* bug fixes

* codacy fixes

* bug fix

* codacy fixes

* Update train_withROCAL_withTFRecordReader.py

* Resolved PR comments

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* rocAL - fix bug in the usage of GetImageName (#955)

* fix bug in the usage of GetImageName

* add ground-truth labels .txt file for tinydataset

* rename file to all smaller case

* AMD - OpenVX Float16 Support (#956)

* AMD - Float16 Support

* Remove redundant def

* OpenVX FP16 - CPP FP16 support

* migraphx  - palamida scan fix (#984)

* Delete image_0.jpg

* Delete image_1.jpg

* Delete image_4.jpg

* image update

* Readme updates - OpenVX Trademark Updates (#989)

* Readme updates - OpenVX Trademark Updates

* Readme - Attribution Updates

* Readme - Codacy Fix

* Media - License Issue Fix (#990)

* Fix include path issue in image augmentation app.[rocAL]

* CMake clean up. [rocAL]

* Clean up. Introduce header files to include all nodes and meta nodes headers. [rocAL]

* Change include directories path in image_augmentation app.

* CMake clean up in rocAL utilities.

* Clean up.

Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* Resolve the PR comments

* Resolve PR Comments

* Fix the bug with Resize Node

* AMD OpenVX - HIP cleanup (#997)

* amd-openvx-hip: create a separate stream for graph

* removed hipstream associated with context since it is not used

* fix for review comments

* docker - Pytorch with mesa driver (#998)

* Create mivisionx-with-pytorch-with-mesa.dockerfile

Adding dockerfile for pytorch with mesa driver for hardware decode

* bug fixes to dockerfile

Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>

* OS Support - Updates (#994)

* Docker - Archive Old OS

* Docker Updates - Fix Support

* Setup - Updates

* OpenCV - Upgrade to 4.6.0

* Docker - Name Fix

* U20 Fix

* Docker Readme - Updates

* Minor change in the unittest

* Remove RPATH/RUNPATH - Adding SKIP RPATH flag (#995)

* Adding SKIP RPATH flag

* Update Review Comments-SKIP_RPATH replaced with SKIP_INSTALL_RPATH, disable use_link_path

* Review Comments Updated

* Resolve the internal PR comments

* Minor change in image.cpp

* Minor change in decoder.h

* Minor change in fused_crop_decoder.cpp

* Minor changes

* Minor changes

* Minor changes

* Correct spacing issues

* Wrap long lines of code in decoders.py

* Remove extra line in readers.py

* Removes extra line from fused_crop_decoder.cpp

* Remove Trailing white space in rocal_pybind.cpp

* Wrapping up the long lines of code in decoders.py

* Resolving PR comments

* Update decoders.py

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>
Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* Setup & CMakeList - Updates (#1021)

* RPP - Upgrade to V0.99 (#1018)

* CMakeList - Adding RPATH flag (#995)" (#1017)

This reverts commit a5a4948f40ef1b50019137d6085e947d06d0d7e7.

* Setup - Support for RedHat and Updates (#1020)

* Setup - Updates

* Setup - Fix MIOpen Install

* Readme - Updates

* RPP Find - Fix

* RPP - Find Include files

* RedHat - rocAL Install Fix

* Setup - Add rocBLAS install

* Setup - Install Inference Deps

* Set - Inference Re-Install

* CMakeList - Find AMDRPP Backend Fix

* Backend Find - Updates

Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* fix crop_mirror_normalize node to do center_crop by default

Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>
Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* adding generic file reader

* adding generic file reader

* rocal python gpu support without torch

* addressing review comments

* re-adding old unit test as pytorch test

* code clean up plus review comments

* final changes

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>
Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* Changes to resize shorter codes

* Using original dims for calculating resize dims for all modes

* Adding fix for when images fail decoding with turbojpeg

* Variable name changes

* ROI name changes

* rocal_pybind - bug fix for one hot encoded labels (#1038)

* one hot label bug fix

* adding comments

* removing duplicate functions

* rocAL - Tf pets training (#1035)

* Updated prerequisite for tf_pets_training

* Updated README.md file

* Resolved PR comments

* Remove --use-feature flag

* Update pip3 to python -m pip

* upgrade pip in dockerfile

---------

Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Akilesh2 <akilesh.giribala@multicorewareinc.com>

* rocAL - changes for classification training convergence (#1036)

* Changes wrt Resizeshorter.[rocAL]

* Adding changes for Image Classification training convergence

* Resolving internal review comments

* Changes to resize shorter codes

* Using original dims for calculating resize dims for all modes

* Adding fix for when images fail decoding with turbojpeg

* Variable name changes

* ROI name changes

---------

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* ADAT - Fix for Deprecated Function (#1046)

* ADAT - modifying code to support python3 (#1047)

* modifying code to support python3

* readme updates

* Using HIP copy kernel for Host pipeline

* rocAL - ResizeMirrorNormalize augmentation node support (#1044)

* RMN node implementation for rocAL

* Resolving review comments and changing RMN RPP node name

* Changing tabs to spaces

* Removing unused variables in RMN openvx node

* Resolving review comments

* Adding python unittest for RMN

* Adding spaces and removing setSeed instances

* Fixing codacy warning

* Adding host only condition for copy kernel

* Add support for single handle creation in VX RPP

* Fixing build issues

* Removing query node op from ResizeTensor

* Adding changes required for passing num_thread values from user to RPP

* rocAL - ResizeMirrorNormalize OCL build fix (#1049)

* RMN node implementation for rocAL

* Resolving review comments and changing RMN RPP node name

* Changing tabs to spaces

* Removing unused variables in RMN openvx node

* Resolving review comments

* Adding python unittest for RMN

* Adding spaces and removing setSeed instances

* Fixing codacy warning

* Rearranged if statement to fix OCL build error

* rocAL - Prefetch queue depth python example (#1048)

* Add python example for prefetch queue depth

Reintroduce the python example
Update the python script to use latest rocal python API

* Update README

* Update README.md

* Add copywrite block

Add copywrite block in prefetch queue depth python example

* Replace pytorch iterator with generic iterator

* Add sleep timer in the iterator

* Update README.md

* Minor change

* rocAL - RPP & CuPy updates (#1050)

* RPP - Name Updates

* Setup - Install CuPy

* Setup - CuPy Updates

* Setup - Remove redundant

* Setup - CuPy Updates

* Setup - fix numpy version

* PIP Install - Fix Version

* Model Compiler - Readme Updates

* Model Compiler - Readme Updates

* Backend - CPU Deps support (#1053)

* Setup - CPU Backend Updates

* Readme - Updates

* Library Test - Updates to CPU Backend (#1056)

* Adding changes for querying numthreads from graph through node

* Adding num_threads for decoding

* Adding num_threads for transfer kernel

* Adding shard count to master_graph for thread calculation

* Single handle creation for all batchPD RPP kernels

* Adding node attribute for querying num_threads

* Adding num_thread calculation in loader itself and adding normalization_on_device option for user

* Remove IBS and associated changes from MasterGraph

* Fix Build issues

* Removing all IBS instances from rocAL

* Fixed output_height calculation

* Setting default num_threads as 0 since num_threads is defined as size_t

* Setting normalization_on_device parameter in pipeline instead of iterator

* Fixing conditional bug in copy_out_tensor

* Adding back IBS to rocAL to fix segfault

* Resolving review comments and adding option for label copy to device

* Removing IBS from rocAL

* Removing UBS query function from master_graph

* Fixing CMake warnings during build

* Fixing issues with single handle creation of some vx_rpp nodes

* Fixing codacy warnings in rocAL

* Renaming RPP handle and other handle related functions

* Adding guards around HIP and OCL calls

* Removing conflict macro definitions and adding a common macro

* Removing repeated num_threads calculation and using num_threads value from master graph

* rocAL - remove shuffle_time from rocal timing (#1063)

* rocAL - pyBind build changes (#1054)

* Video Reader Python API change (#1033)

* Fix Video Reader Resize Python end

* Fix Video Reader Resize Python end

* Adjust spacing

---------

Co-authored-by: root <root@ixt-sjc2-52.local.lan>

* rocAL - adding generic plugin for GPU support  (#1034)

* Linux - Distro Docker Support (#1027)

* Linux - Distro Docker Support

* LinuX Dockers - RHEL 8 Fix

* Test - Updates

* rocAL - cmn fix (#1024)

* rocAL: Classification Training Related changes (#1001)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* Add API to get reader config and decoder config

* Add API to obtain max and min aspect ratio from image source evaluator

* Add scaling modes support

Add support to pass the resize scaling modes
Add support to calculate the normalized crop

* Minor change

* Remove crop parameters and related changes for resize

* Fix segmentation fault

* Fix error with resize modes

* MInor fix : update tensor ROI

* Minor fix - center crop

* Update the python API for resize with scaling modes and interpolation param

* Minor changes

* Minor changes

* Minor change

* Remove center crop related changes

* Remove redundant max size check

* Remove crop param from node resize

* Remove source evaluator

* Minor fix

* Remove the get decoder and reader config API

* Remove aspect ratio calculations in source evaluator

* Remove decoder and reader config variables

Remove crop related changes

* Remove decoder and reader config variables

Remove crop related changes

* Minor fix for max size

* Code clean up

* Minor change

* Minor changes

* Minor changes

* Minor change

* Fix python codacy warnings

* Minor codacy fix

* Revert "Minor codacy fix"

This reverts commit df1dd28427e5e133f23247c0dcece744e9ebf5b1.

* Minor change

* Minor code changes

* Remove API to get max width and height for resize node

* Minor fix

* Minor changes

* Working Image Classification Chnages

* Working Image Classification USER GIVEN PARAMS

* Add changes in types.py

* 1. Code clean up
2. Centre Crop bug fix

* Code Clean Up

* Add centre_crop changes

* ResizeTensor addition

* Minor changes in PR

* ResizeTensor.cpp - Removing OpenCL backend support

* Code Clean Up

* Resolving internal PR comments

* Resolve the internal review comments -2

* Reesolve build error

* runVisionTest - add a new test (#979)

* rocAL PyBind - Wheel Package Fix (#982)

Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>

* amd media - device support (#983)

* amd_media decoder add parameter for passing deviceid

* minor cleanup

* fix for review comments

* docker update - rpp version update (#986)

* Update mivisionx-with-pytorch.dockerfile

* Update mivisionx-with-tensorflow.dockerfile

* Update level-5.dockerfile

* Update mivisionx-on-ubuntu20.dockerfile

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* rocal - README updates and directory name change (#981)

* Update README.md

* Update README.md

* folder name change

* Update README.md

* Delete PYTHON_UNITTEST_TEST_FILE.sh

* Delete rocAL/rocAL_pybind/example/new_api directory

* Update README.md

* Update README.md

* Update README.md

* Create README.md

* added new random_crop_dec parameter class

* Set the crop values to partial decoder. [rocAL]

* Fix undefined reference error in random number generator. [rocAL]

* Change parameters for rocalFusedCropDecoder wrt new randomgenrator changes. [rocAL]
Remove unused paramaters.

* Clean up wrt Random number generator. [rocAl]

* Convert double to float for aspect ration and random area parameters in fused crop. [rocAL]

* Set seed for every batch in paramater random crop. [rocAL]

* Clean up. [rocAL]

* Fix Bug with seed generation for RNG

* rocAL - hardware decoder python support (#987)

* rocAL - removing references (#954)

* rocAL - Tf pets training  (#947)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* tf_pets_v2

* code_cleanup

* minor code cleanup

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* PyTorch docker file - add argument for specifying version (#938)

* add argument for specifying pytorch version for building docker file

* add readme for pytorch

* rocAL - Fix ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED (#940)

* Docker - codacy fix for pr937 (#942)

* rocAL - Adding NCHW FP16 SIMD kernel (#926)

* Adding NCHW FP16 SIMD kernel for normalization and buffer copy

* Fixed some codestyle issues with FP16 kernel

* Using FMA SSE instruction for multiply-add ops

* Removed extra spaces

* Adding fma flag to rocAL CMakeLists

* Adding FP16 intrinsics for buffer copies

* Setting rounding mode to _MM_FROUND_TO_ZERO

* rocAL  - README updates for video unit test (#939)

* Add README support for video unit test

* Update Readme for video unit test

* Minor test_suite fix

* Update video unit test Readme

* Update Readme

* Updated README with the explation of test cases and arguments

* Minor fix

* Add test case samples to video unit test README

Also add images for README

* Modify sample images

* Change sample image dimension

* Minor README changes

* Minor README changes

* Minor change

* Minor fix to handle relative input path in video unit test

* Resolve codacy warnings

* Minor change

* Add correct video reader outputs

* MIVisionX - cmake cleanup (#943)

* OpenCV EXT - Updates & Tests (#944)

* OpenCV - Readme updates

* Updates - Readme & Tests

* OpenCV - Tests Added

* Updates

* ZenDNN - model compiler (#941)

* model compiler - zendnn - mnist layers

* bug fix + lrn

* layers: batch norm, sum ; bug fixes

* fixes lgtm errors

* bug fixes

* codacy fixes

* bug fix

* codacy fixes

* Update train_withROCAL_withTFRecordReader.py

* Resolved PR comments

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* rocAL - fix bug in the usage of GetImageName (#955)

* fix bug in the usage of GetImageName

* add ground-truth labels .txt file for tinydataset

* rename file to all smaller case

* AMD - OpenVX Float16 Support (#956)

* AMD - Float16 Support

* Remove redundant def

* OpenVX FP16 - CPP FP16 support

* AMD Media Decoder - Measure Decode Time (#964)

* added what Aryan recommended to decoder performance measure code

* added transfer time measure

* rocAL - Changing Python Lib Path (#959)

* Changing Python Lib Path

* Keep the checks for different env intact

Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>

* MIVisionX - CMakeList Updates (#967)

* CMakeList Updates

* CMakeList - Cleanup

* Setup - Updates

* rocAL - CMakeList Cleanup

* rocAL - Resize scaling modes support (#950)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* Add API to get reader config and decoder config

* Add API to obtain max and min aspect ratio from image source evaluator

* Add scaling modes support

Add support to pass the resize scaling modes
Add support to calculate the normalized crop

* Minor change

* Remove crop parameters and related changes for resize

* Fix segmentation fault

* Fix error with resize modes

* MInor fix : update tensor ROI

* Minor fix - center crop

* Update the python API for resize with scaling modes and interpolation param

* Minor changes

* Minor changes

* Minor change

* Remove center crop related changes

* Remove redundant max size check

* Remove crop param from node resize

* Remove source evaluator

* Minor fix

* Remove the get decoder and reader config API

* Remove aspect ratio calculations in source evaluator

* Remove decoder and reader config variables

Remove crop related changes

* Remove decoder and reader config variables

Remove crop related changes

* Minor fix for max size

* Code clean up

* Minor change

* Minor changes

* Minor changes

* Minor change

* Fix python codacy warnings

* Minor codacy fix

* Revert "Minor codacy fix"

This reverts commit df1dd28427e5e133f23247c0dcece744e9ebf5b1.

* Minor change

* Minor code changes

* Remove API to get max width and height for resize node

* Resize ROI changes

* Code cleanup

* Rename variables

* Code cleanup

* MInor changes

* Minor change

* Minor fix

* Minor changes

* Modify logic to calculate max size for each mode

* Fix  max_size calculation algorithm

* Fix max_size calculation logic

* Minor changes

* Minor change

* Add space after if

* Minor change

* Minor changes

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>

* rocAL - fix for copy-write violation (#968)

* fix for copywrite violation

* fix for review comments and other clean_up

* minor clean_up

* revert run.sh changes

* fix codacy warnings

* add jupyter notebook for decoder

* rocAL - add missing header (#972)

* rocAL - add missing header

* Tested Config Updates

* OpenVX Framework - update max tensor dims to 6 (#970)

* add pipeline decorator for rocal

* fix build error

* fix script for jupyter notebook

* changes to Jupyter notebook to support HW decoder

* fixed review comments

* hardcoding decoder device to cpu for python unit tests

* add option for decoder.py to run on gpu/cpu

Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>

* Fix Python build

* Wrap long lines of code

* Fix spacing & add copyright in pybind

* amd-openvx-hip: create a separate stream for graph (#996)

* rocAL -  CMake and header files Clean up (#991)

* rocAL - removing references (#954)

* rocAL - Tf pets training  (#947)

* Zen DNN - Docker & Tests (#924)

* Zen DNN - Docker Updates

* Zen DNN - Sample Updates

* Codacy - Fix

* Zen DNN - Cleanup

* Zen DNN - single layer sample

* Rocal Updates (#921)

* rocal updates for tf training

* updates for rocal

* tf updates and pytorch bug fixes

* repo name change

* Update README.md

* dockerfile update

* [rocAL] Fix rocAL Pybind build issue.

* [rocAL] Remove unused function in pipeline.

* [rocAL] Change rocAL pybind installation from setup.py to wheel.
setup.py install is deprecated in python 3.9

* [rocAL] Make TF pets example dataset compatible with tf2.

* [rocAL] Change getImageLabels() compatible with tf.

* [rocAL] Add fix to pick wheel from dist installation folder.
Remove the old installation files in conda environment.

* [rocAL] Remove commented statement.

Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>

* Docker Update (#928)

* turboJPEG version update

* turboJPEG version update

* turboJPEG version update

* TurboJPEG version update

* Update mivisionx-opencl-on-ubuntu20.dockerfile

* Update zenDNN-HIP.dockerfile

* Update level-5.dockerfile

* Update level-5.dockerfile

* Zen DNN Updates Sync

Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>

* AMD OpenVX Custom Extension - implementation (#925)

* custom node implementation files

* fix build errors

* custom extension changes for working implementation

* add README and documentation

* update readme

* fix codacy issues and CPU flow

* fix cadacy warning

* Addressed review comments

* minor change

* fix formating

* amd_migraphx - update readme for extension (#929)

* amd_custom - fixes build issue (#935)

* fixes build issue

* Update CMakeLists.txt

* tf_pets_v2

* code_cleanup

* minor code cleanup

* migraphx extension - update the readme(#936)

* vx_amd_migraphx - tests (#923)

* batch size support for migraphx

* changing to accept tensors of all batch sizes

* creates file with results

* bug fix

* changes to singular test cases - mnist and resnet50

* readme updates

* resolving PR comments

* resolving PR comments

* resolving PR comments

* Readme update to reflect tot

* formatting

* fixing typo

* readme update

* readme update

* OpenVX HIP backend - report correct number of CUs for gfx10+ in the logs (#930)

* PyTorch docker file - add argument for specifying version (#938)

* add argument for specifying pytorch version for building docker file

* add readme for pytorch

* rocAL - Fix ROCAL_USE_USER_GIVEN_SIZE_RESTRICTED (#940)

* Docker - codacy fix for pr937 (#942)

* rocAL - Adding NCHW FP16 SIMD kernel (#926)

* Adding NCHW FP16 SIMD kernel for normalization and buffer copy

* Fixed some codestyle issues with FP16 kernel

* Using FMA SSE instruction for multiply-add ops

* Removed extra spaces

* Adding fma flag to rocAL CMakeLists

* Adding FP16 intrinsics for buffer copies

* Setting rounding mode to _MM_FROUND_TO_ZERO

* rocAL  - README updates for video unit test (#939)

* Add README support for video unit test

* Update Readme for video unit test

* Minor test_suite fix

* Update video unit test Readme

* Update Readme

* Updated README with the explation of test cases and arguments

* Minor fix

* Add test case samples to video unit test README

Also add images for README

* Modify sample images

* Change sample image dimension

* Minor README changes

* Minor README changes

* Minor change

* Minor fix to handle relative input path in video unit test

* Resolve codacy warnings

* Minor change

* Add correct video reader outputs

* MIVisionX - cmake cleanup (#943)

* OpenCV EXT - Updates & Tests (#944)

* OpenCV - Readme updates

* Updates - Readme & Tests

* OpenCV - Tests Added

* Updates

* ZenDNN - model compiler (#941)

* model compiler - zendnn - mnist layers

* bug fix + lrn

* layers: batch norm, sum ; bug fixes

* fixes lgtm errors

* bug fixes

* codacy fixes

* bug fix

* codacy fixes

* Update train_withROCAL_withTFRecordReader.py

* Resolved PR comments

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* rocAL - fix bug in the usage of GetImageName (#955)

* fix bug in the usage of GetImageName

* add ground-truth labels .txt file for tinydataset

* rename file to all smaller case

* AMD - OpenVX Float16 Support (#956)

* AMD - Float16 Support

* Remove redundant def

* OpenVX FP16 - CPP FP16 support

* migraphx  - palamida scan fix (#984)

* Delete image_0.jpg

* Delete image_1.jpg

* Delete image_4.jpg

* image update

* Readme updates - OpenVX Trademark Updates (#989)

* Readme updates - OpenVX Trademark Updates

* Readme - Attribution Updates

* Readme - Codacy Fix

* Media - License Issue Fix (#990)

* Fix include path issue in image augmentation app.[rocAL]

* CMake clean up. [rocAL]

* Clean up. Introduce header files to include all nodes and meta nodes headers. [rocAL]

* Change include directories path in image_augmentation app.

* CMake clean up in rocAL utilities.

* Clean up.

Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>

* Resolve the PR comments

* Resolve PR Comments

* Fix the bug with Resize Node

* AMD OpenVX - HIP cleanup (#997)

* amd-openvx-hip: create a separate stream for graph

* removed hipstream associated with context since it is not used

* fix for review comments

* docker - Pytorch with mesa driver (#998)

* Create mivisionx-with-pytorch-with-mesa.dockerfile

Adding dockerfile for pytorch with mesa driver for hardware decode

* bug fixes to dockerfile

Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>

* OS Support - Updates (#994)

* Docker - Archive Old OS

* Docker Updates - Fix Support

* Setup - Updates

* OpenCV - Upgrade to 4.6.0

* Docker - Name Fix

* U20 Fix

* Docker Readme - Updates

* Minor change in the unittest

* Remove RPATH/RUNPATH - Adding SKIP RPATH flag (#995)

* Adding SKIP RPATH flag

* Update Review Comments-SKIP_RPATH replaced with SKIP_INSTALL_RPATH, disable use_link_path

* Review Comments Updated

* Resolve the internal PR comments

* Minor change in image.cpp

* Minor change in decoder.h

* Minor change in fused_crop_decoder.cpp

* Minor changes

* Minor changes

* Minor changes

* Correct spacing issues

* Wrap long lines of code in decoders.py

* Remove extra line in readers.py

* Removes extra line from fused_crop_decoder.cpp

* Remove Trailing white space in rocal_pybind.cpp

* Wrapping up the long lines of code in decoders.py

* Resolving PR comments

* Update decoders.py

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>
Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* Setup & CMakeList - Updates (#1021)

* RPP - Upgrade to V0.99 (#1018)

* CMakeList - Adding RPATH flag (#995)" (#1017)

This reverts commit a5a4948f40ef1b50019137d6085e947d06d0d7e7.

* Setup - Support for RedHat and Updates (#1020)

* Setup - Updates

* Setup - Fix MIOpen Install

* Readme - Updates

* RPP Find - Fix

* RPP - Find Include files

* RedHat - rocAL Install Fix

* Setup - Add rocBLAS install

* Setup - Install Inference Deps

* Set - Inference Re-Install

* CMakeList - Find AMDRPP Backend Fix

* Backend Find - Updates

Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* fix crop_mirror_normalize node to do center_crop by default

Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: LakshmiKumar23 <lakshmi.kumar@amd.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-52.local.lan>
Co-authored-by: Sundar Rajan Vaithiyanathan <99159823+SundarRajan28@users.noreply.github.com>
Co-authored-by: Fiona-MCW <70996026+fiona-gladwin@users.noreply.github.com>
Co-authored-by: Pavel Tcherniaev <Pavel.Tcherniaev@amd.com>
Co-authored-by: IndumathiR <indumathi@multicorewareinc.com>
Co-authored-by: Lakshmi <lakshmi@ixt-sjc2-52.local.lan>
Co-authored-by: arvindcheru <90783369+arvindcheru@users.noreply.github.com>

* adding generic file reader

* adding generic file reader

* rocal python gpu support without torch

* addressing review comments

* re-adding old unit test as pytorch test

* code clean up plus review comments

* final changes

---------

Co-authored-by: Kiriti Gowda <kiritigowda@gmail.com>
Co-authored-by: Rajy Rawther <Rajy.MeeyakhanRawther@amd.com>
Co-authored-by: swetha097 <59434434+swetha097@users.noreply.github.com>
Co-authored-by: shobana-mcw <shobana@multicorewareinc.com>
Co-authored-by: Kiriti Gowda <kiriti.nageshgowda@amd.com>
Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
Co-authored-by: fiona-gladwin <fionagladwin@multicorewareinc.com>
Co-authored-by: root <root@jenkins-worker-rocm-amd-104.local.lan>
Co-authored-by: Swetha B S <swetha@mutlicorewareinc.com>
Co-authored-by: Swetha B S <swetha@multiocrewareinc.com>
Co-authored-by: root <root@ixt-sjc2-5…
  • Loading branch information
19 people committed May 19, 2023
1 parent 20445ec commit 14066e9
Show file tree
Hide file tree
Showing 143 changed files with 1,409 additions and 2,864 deletions.
4 changes: 2 additions & 2 deletions MIVisionX-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.0.0',
help='RPP Version - optional (default:1.0.0)')
parser.add_argument('--rpp', type=str, default='1.1.0',
help='RPP Version - optional (default:1.1.0)')
parser.add_argument('--ffmpeg', type=str, default='ON',
help='FFMPEG V4.4.2 Installation - optional (default:ON) [options:ON/OFF]')
parser.add_argument('--neural_net', type=str, default='ON',
Expand Down
1 change: 1 addition & 0 deletions amd_openvx/openvx/ago/ago_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,7 @@ struct AgoGraph {
bool detectedInvalidNode;
vx_int32 status;
vx_perf_t perf;
vx_uint32 cpu_num_threads;
vx_enum state;
bool reverify;
struct AgoGraphPerfInternalInfo_ { // shall be identical to AgoGraphPerfInternalInfo in amd_ext_amd.h
Expand Down
19 changes: 19 additions & 0 deletions amd_openvx/openvx/api/vx_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3148,6 +3148,12 @@ VX_API_ENTRY vx_status VX_API_CALL vxQueryGraph(vx_graph graph, vx_enum attribut
}
break;
#endif
case VX_GRAPH_ATTRIBUTE_AMD_CPU_NUM_THREADS:
if (size == sizeof(vx_uint32)) {
*(vx_uint32 *)ptr = (vx_uint32)graph->cpu_num_threads;
status = VX_SUCCESS;
}
break;
default:
status = VX_ERROR_NOT_SUPPORTED;
break;
Expand Down Expand Up @@ -3215,6 +3221,12 @@ VX_API_ENTRY vx_status VX_API_CALL vxSetGraphAttribute(vx_graph graph, vx_enum a
graph->attr_affinity = *(AgoTargetAffinityInfo_ *)ptr;
}
break;
case VX_GRAPH_ATTRIBUTE_AMD_CPU_NUM_THREADS:
if (size == sizeof(vx_uint32)) {
graph->cpu_num_threads = *(vx_uint32 *)ptr;
status = VX_SUCCESS;
}
break;
default:
status = VX_ERROR_NOT_SUPPORTED;
break;
Expand Down Expand Up @@ -3421,6 +3433,13 @@ VX_API_ENTRY vx_status VX_API_CALL vxQueryNode(vx_node node, vx_enum attribute,
status = VX_SUCCESS;
}
break;
case VX_NODE_ATTRIBUTE_AMD_CPU_NUM_THREADS:
if (size == sizeof(vx_uint32)) {
AgoGraph * graph = (AgoGraph *)node->ref.scope;
*(vx_uint32 *)ptr = graph->cpu_num_threads;
status = VX_SUCCESS;
}
break;
#if ENABLE_OPENCL
case VX_NODE_ATTRIBUTE_AMD_OPENCL_COMMAND_QUEUE:
if (size == sizeof(cl_command_queue)) {
Expand Down
5 changes: 4 additions & 1 deletion amd_openvx/openvx/include/vx_ext_amd.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ enum vx_graph_attribute_amd_e {
VX_GRAPH_ATTRIBUTE_AMD_PERFORMANCE_INTERNAL_PROFILE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x07,
/*! \brief OpenCL command queue. Use a <tt>\ref cl_command_queue</tt> parameter.*/
VX_GRAPH_ATTRIBUTE_AMD_OPENCL_COMMAND_QUEUE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x08,
/*! \brief CPU num_threads to be used in RPP. Use a <tt>\ref vx_uint32</tt> parameter.*/
VX_GRAPH_ATTRIBUTE_AMD_CPU_NUM_THREADS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_GRAPH) + 0x09
};

/*! \brief The AMD node attributes list.
Expand All @@ -155,7 +157,8 @@ enum vx_node_attribute_amd_e {
VX_NODE_ATTRIBUTE_AMD_AFFINITY = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x01,
/*! \brief OpenCL command queue. Use a <tt>\ref cl_command_queue</tt> parameter.*/
VX_NODE_ATTRIBUTE_AMD_OPENCL_COMMAND_QUEUE = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x02,
VX_NODE_ATTRIBUTE_AMD_HIP_STREAM = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x03
VX_NODE_ATTRIBUTE_AMD_HIP_STREAM = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x03,
VX_NODE_ATTRIBUTE_AMD_CPU_NUM_THREADS = VX_ATTRIBUTE_BASE(VX_ID_AMD, VX_TYPE_NODE) + 0x04
};

/*! \brief The AMD image attributes list.
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/activation_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static vx_status VX_CALLBACK initializeActivationLayer(vx_node node, const vx_re
{
ActivationLayerLocalData * data = new ActivationLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initializing input and output Descriptors.
vx_size input_dims[4], output_dims[4];
Expand Down Expand Up @@ -171,7 +171,7 @@ static vx_status VX_CALLBACK uninitializeActivationLayer(vx_node node, const vx_
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->inputDescriptor));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->outputDescriptor));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static vx_status VX_CALLBACK initializeBatchNormalizationLayer(vx_node node, con
{
BatchNormLayerLocalData * data = new BatchNormLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

// initialize input and output tensor descriptors.
vx_size input_dims[4], output_dims[4];
Expand Down Expand Up @@ -243,7 +243,7 @@ static vx_status VX_CALLBACK uninitializeBatchNormalizationLayer(vx_node node, c
#endif
}
}
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/convolution_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static vx_status VX_CALLBACK initializeConvolutionLayer(vx_node node, const vx_r
{
ConvolutionLayerLocalData * data = new ConvolutionLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//convolution params.
vx_nn_convolution_params_t params;
Expand Down Expand Up @@ -464,7 +464,7 @@ static vx_status VX_CALLBACK uninitializeConvolutionLayer(vx_node node, const vx
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->weight_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->bias_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/deconvolution_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static vx_status VX_CALLBACK initializeDeconvolutionLayer(vx_node node, const vx
{
DeconvolutionLayerLocalData * data = new DeconvolutionLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//deconvolution params.
vx_nn_deconvolution_params_t params;
Expand Down Expand Up @@ -292,7 +292,7 @@ static vx_status VX_CALLBACK uninitializeDeconvolutionLayer(vx_node node, const
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->weight_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->bias_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/fully_connected_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static vx_status VX_CALLBACK initializeFullyConnectedLayer(vx_node node, const v
{
FullyConnectedLayerLocalData * data = new FullyConnectedLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//input,weight,bias,output descriptors.
miopenConvolutionMode_t mode = miopenConvolution;
Expand Down Expand Up @@ -263,7 +263,7 @@ static vx_status VX_CALLBACK uninitializeFullyConnectedLayer(vx_node node, const
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->weight_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->bias_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/kernels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ int getEnvironmentVariable(const char * name, char * value, size_t valueSize)
return -1;
}

vx_status createGraphHandle(vx_node node, NeuralNetworkCommonHandle ** pHandle)
vx_status createRPPHandle(vx_node node, NeuralNetworkCommonHandle ** pHandle)
{
NeuralNetworkCommonHandle * handle = NULL;
ERROR_CHECK_STATUS(vxGetModuleHandle(node, OPENVX_KHR_NN, (void **)&handle));
Expand Down Expand Up @@ -132,7 +132,7 @@ vx_status createGraphHandle(vx_node node, NeuralNetworkCommonHandle ** pHandle)
return VX_SUCCESS;
}

vx_status releaseGraphHandle(vx_node node, NeuralNetworkCommonHandle * handle)
vx_status releaseRPPHandle(vx_node node, NeuralNetworkCommonHandle * handle)
{
handle->count--;
if(handle->count == 0) {
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ struct NeuralNetworkCommonHandle {
//! \brief The utility functions
vx_node createNode(vx_graph graph, vx_enum kernelEnum, vx_reference params[], vx_uint32 num);
vx_reference getNodeParameterByIndex(vx_node node, vx_uint32 index);
vx_status createGraphHandle(vx_node node, NeuralNetworkCommonHandle ** pHandle);
vx_status releaseGraphHandle(vx_node node, NeuralNetworkCommonHandle * handle);
vx_status createRPPHandle(vx_node node, NeuralNetworkCommonHandle ** pHandle);
vx_status releaseRPPHandle(vx_node node, NeuralNetworkCommonHandle * handle);
int getEnvironmentVariable(const char* name, char * value, size_t valueSize);
void nn_layer_test_dumpBuffer(const char * fileNameFormat, vx_tensor tensor);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static vx_status VX_CALLBACK initializeLocalResponseNormalizationLayer(vx_node n
{
LocalResponseNormalizationLayerLocalData * data = new LocalResponseNormalizationLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));
miopenDataType_t data_type; // data_type for the kernel

vx_size input_dims[4], output_dims[4];
Expand Down Expand Up @@ -185,7 +185,7 @@ static vx_status VX_CALLBACK uninitializeLocalResponseNormalizationLayer(vx_node
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/normalization_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static vx_status VX_CALLBACK initializeNormalizationLayer(vx_node node, const vx
{
NormalizationLayerLocalData * data = new NormalizationLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));
miopenDataType_t data_type; // data_type for the kernel

vx_size input_dims[4], output_dims[4];
Expand Down Expand Up @@ -186,7 +186,7 @@ static vx_status VX_CALLBACK uninitializeNormalizationLayer(vx_node node, const
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/pooling_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ static vx_status VX_CALLBACK initializePoolingLayer(vx_node node, const vx_refer
{
PoolingLayerLocalData * data = new PoolingLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//Deducing the pooling type.
vx_nn_pooling_type_e modeType;
Expand Down Expand Up @@ -241,7 +241,7 @@ static vx_status VX_CALLBACK uninitializePoolingLayer(vx_node node, const vx_ref
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/reshape_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static vx_status VX_CALLBACK initializeReshapeLayer(vx_node node, const vx_refer
vx_enum type;
ReshapeLayerLocalData * data = new ReshapeLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));
ERROR_CHECK_STATUS(vxQueryTensor((vx_tensor)parameters[0], VX_TENSOR_DIMS, dims, sizeof(dims)));
ERROR_CHECK_STATUS(vxQueryTensor((vx_tensor)parameters[0], VX_TENSOR_DATA_TYPE, &type, sizeof(type)));
// check if the input and output tensors are aliased
Expand All @@ -124,7 +124,7 @@ static vx_status VX_CALLBACK uninitializeReshapeLayer(vx_node node, const vx_ref
ReshapeLayerLocalData * data = NULL;
ERROR_CHECK_STATUS(vxQueryNode(node, VX_NODE_LOCAL_DATA_PTR, &data, sizeof(data)));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/scale_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ static vx_status VX_CALLBACK initializeScaleLayer(vx_node node, const vx_referen
{
ScaleLayerLocalData * data = new ScaleLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initialize input and output tensor descriptors.
vx_size input_dims[4], output_dims[4];
Expand Down Expand Up @@ -245,7 +245,7 @@ static vx_status VX_CALLBACK uninitializeScaleLayer(vx_node node, const vx_refer

}
}
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/softmax_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static vx_status VX_CALLBACK initializeSoftmaxLayer(vx_node node, const vx_refer
{
SoftmaxLayerLocalData * data = new SoftmaxLayerLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//Parameters input and output.
vx_enum out_type;
Expand Down Expand Up @@ -166,7 +166,7 @@ static vx_status VX_CALLBACK uninitializeSoftmaxLayer(vx_node node, const vx_ref
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input_desc));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output_desc));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/tensor_add.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ static vx_status VX_CALLBACK initializeTensorAddition(vx_node node, const vx_ref
{
TensorAddLocalData * data = new TensorAddLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initialize input and output tensor descriptors.
vx_enum type;
Expand Down Expand Up @@ -176,7 +176,7 @@ static vx_status VX_CALLBACK uninitializeTensorAddition(vx_node node, const vx_r
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input2));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/tensor_matrix_multiply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static vx_status VX_CALLBACK initialize(vx_node node, const vx_reference *parame
// create and initialize local data
LocalData * data = new LocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

// set flags to control matrix transpose and m, n, and k
data->tA = params.transpose_input1 ? true : false;
Expand Down Expand Up @@ -623,7 +623,7 @@ static vx_status VX_CALLBACK uninitialize(vx_node node, const vx_reference *para
}
}
#endif
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/tensor_max.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static vx_status VX_CALLBACK initializeTensorMax(vx_node node, const vx_referenc
{
TensorMaxLocalData * data = new TensorMaxLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initialize input and output tensor descriptors.
vx_enum type;
Expand Down Expand Up @@ -163,7 +163,7 @@ static vx_status VX_CALLBACK uninitializeTensorMax(vx_node node, const vx_refere
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input2));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/tensor_min.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static vx_status VX_CALLBACK initializeTensorMin(vx_node node, const vx_referenc
{
TensorMinLocalData * data = new TensorMinLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initialize input and output tensor descriptors.
vx_enum type;
Expand Down Expand Up @@ -162,7 +162,7 @@ static vx_status VX_CALLBACK uninitializeTensorMin(vx_node node, const vx_refere
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input2));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
4 changes: 2 additions & 2 deletions amd_openvx_extensions/amd_nn/src/tensor_multiply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static vx_status VX_CALLBACK initializeTensorMultiply(vx_node node, const vx_ref
{
TensorMultiplyLocalData * data = new TensorMultiplyLocalData;
memset(data, 0, sizeof(*data));
ERROR_CHECK_STATUS(createGraphHandle(node, &data->handle));
ERROR_CHECK_STATUS(createRPPHandle(node, &data->handle));

//initialize input and output tensor descriptors.
vx_enum type;
Expand Down Expand Up @@ -172,7 +172,7 @@ static vx_status VX_CALLBACK uninitializeTensorMultiply(vx_node node, const vx_r
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->input2));
ERROR_CHECK_MIOPEN_STATUS(miopenDestroyTensorDescriptor(data->output));
if (data) {
ERROR_CHECK_STATUS(releaseGraphHandle(node, data->handle));
ERROR_CHECK_STATUS(releaseRPPHandle(node, data->handle));
delete data;
}
return VX_SUCCESS;
Expand Down
Loading

0 comments on commit 14066e9

Please sign in to comment.