-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPP Tensor Support - Fisheye on HOST and HIP #346
base: develop
Are you sure you want to change the base?
Conversation
sampath1117
commented
Sep 25, 2024
- Adds tensor support for Fog function optimized on AVX2 and HIP
- Adds test suite support
consolidated the code
01e5007
to
2113c51
Compare
CHANGELOG.md
Outdated
@@ -2,12 +2,19 @@ | |||
|
|||
Full documentation for RPP is available at [https://rocm.docs.amd.com/projects/rpp/en/latest](https://rocm.docs.amd.com/projects/rpp/en/latest) | |||
|
|||
## RPP 1.18.0 (unreleased) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the change under 1.9.10
CMakeLists.txt
Outdated
@@ -43,7 +43,7 @@ endif() | |||
set(CMAKE_CXX_STANDARD 17) | |||
|
|||
# RPP Version | |||
set(VERSION "1.9.10") | |||
set(VERSION "1.18.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set version here to 1.9.10
include/rpp_version.h
Outdated
@@ -39,8 +39,8 @@ extern "C" { | |||
#endif | |||
// NOTE: IMPORTANT: Match the version with CMakelists.txt version | |||
#define RPP_VERSION_MAJOR 1 | |||
#define RPP_VERSION_MINOR 9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here also retain version to 1.9.10
src/include/cpu/rpp_cpu_simd.hpp
Outdated
@@ -120,6 +120,8 @@ const __m256 avx_p255 = _mm256_set1_ps(255.0f); | |||
const __m256 avx_p1op255 = _mm256_set1_ps(1.0f / 255.0f); | |||
const __m256 avx_p1op3 = _mm256_set1_ps(1.0f / 3.0f); | |||
const __m256 avx_p2op3 = _mm256_set1_ps(2.0f / 3.0f); | |||
const __m256 avx_pMinus1 = _mm256_set1_ps(-1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this -1.0f?
|
||
inline void compute_fisheye_src_loc_avx(__m256 &pDstY, __m256 &pDstX, __m256 &pSrcY, __m256 &pSrcX, __m256 &pHeight, __m256 &pWidth) | ||
{ | ||
__m256 pNormX, pNormY, pDist; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the AVX helper functions overall inside #if AVX2
src/modules/cpu/kernel/fisheye.hpp
Outdated
} | ||
|
||
// fisheye without fused output-layout toggle (NHWC -> NHWC) | ||
if ((srcDescPtr->c == 3) && (srcDescPtr->layout == RpptLayout::NHWC) && (dstDescPtr->layout == RpptLayout::NHWC)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this must be else if
src/modules/cpu/kernel/fisheye.hpp
Outdated
{ | ||
__m256i pRow; | ||
rpp_simd_load(rpp_generic_nn_load_i8pln1_avx, srcPtrTempChn, srcLocArray, invalidLoad, pRow); | ||
rpp_storeu_si64((__m128i *)(dstPtrTempChn), _mm256_castsi256_si128(pRow)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably use reinterpret_cast<__m128i *>(dstPtrTempChn) here
int id_z = hipBlockIdx_z * hipBlockDim_z + hipThreadIdx_z; | ||
int4 srcRoi_i4 = *(int4 *)&roiTensorPtrSrc[id_z]; | ||
int width = (srcRoi_i4.z - srcRoi_i4.x) + 1; | ||
int height = (srcRoi_i4.w - srcRoi_i4.y) + 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in all the functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address review comments. Thanks
b25e8ec
to
8b40e87
Compare
…ocs/sphinx (ROCm#515) Bumps [rocm-docs-core[api_reference]](https://github.com/ROCm/rocm-docs-core) from 1.14.1 to 1.15.0. - [Release notes](https://github.com/ROCm/rocm-docs-core/releases) - [Changelog](https://github.com/ROCm/rocm-docs-core/blob/develop/CHANGELOG.md) - [Commits](ROCm/rocm-docs-core@v1.14.1...v1.15.0) --- updated-dependencies: - dependency-name: rocm-docs-core[api_reference] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>