Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPP Log Tensor on HOST and HIP #372

Merged
merged 97 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 96 commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
dcd54ac
experimental changes for adding qa mode for performance tests
sampath1117 Jan 18, 2024
50138ea
made changes to add display more information w.r.t QA results summary…
sampath1117 Jan 19, 2024
f3bea0e
minor changes
sampath1117 Jan 19, 2024
58a915a
Add changes to dump qa results to excel file
HazarathKumarM Jan 23, 2024
03c5d27
Add performance QA for three new tensor functions
HazarathKumarM Jan 23, 2024
a5d49a0
update prerequisites in readme
HazarathKumarM Jan 23, 2024
2e0f922
merged latest changes
HazarathKumarM Jan 23, 2024
c097f74
added changes to handle unsupported cases
sampath1117 Jan 23, 2024
ba860e4
removed treshold dictionary and added performance Noise treshold
HazarathKumarM Jan 24, 2024
a7f17f7
RPP Test Suite Upgrade 4 - CSV to BIN conversions for file size reduc…
r-abishek Jan 26, 2024
f6ee505
Merge remote-tracking branch 'TOT/develop' into sr/qa_perf
snehaa8 Jan 29, 2024
b9c8cdc
Merge pull request #221 from sampath1117/sr/qa_perf
r-abishek Jan 29, 2024
fa0e3ab
Changes to the performane summary dataframe
HazarathKumarM Jan 30, 2024
35f26f0
Merge branch 'sr/qa_perf' of https://github.com/sampath1117/rpp into …
HazarathKumarM Jan 30, 2024
067d575
minor changes
HazarathKumarM Jan 30, 2024
8ed21ae
Update CMakeLists.txt to add ${CMAKE_CURRENT_SOURCE_DIR} for CI
r-abishek Jan 31, 2024
1cdfcde
Update CMakeLists.txt fix
r-abishek Jan 31, 2024
f82145e
Update CMakeLists.txt fix
r-abishek Jan 31, 2024
0c4f413
remove tabulate dependency
HazarathKumarM Jan 31, 2024
407360d
Merge pull request #229 from sampath1117/sr/qa_perf
r-abishek Jan 31, 2024
511a7af
Update README.md to remove tabulate pip install
r-abishek Jan 31, 2024
a1f4213
License - updates to 2024 and consistency changes (#298)
r-abishek Jan 31, 2024
7096c1d
Test - Update README.md for test_suite (#299)
r-abishek Jan 31, 2024
dab18e0
Merge branch 'master' of https://github.com/GPUOpen-ProfessionalCompu…
r-abishek Feb 1, 2024
07a5f66
Bump rocm-docs-core[api_reference] from 0.33.0 to 0.33.1 in /docs/sph…
dependabot[bot] Feb 6, 2024
a5e5679
Bump rocm-docs-core[api_reference] from 0.33.1 to 0.33.2 in /docs/sph…
dependabot[bot] Feb 7, 2024
37186bb
Fix for CI machine failure
r-abishek Feb 7, 2024
b889a79
Add note on performance
r-abishek Feb 8, 2024
e8aa6b2
Update doc codeowners (#303)
samjwu Feb 8, 2024
5787417
Merge pull request #297 from r-abishek/ar/test_suite_upgrade_5_qa_perf
paveltc Feb 8, 2024
a921332
Documentation - Bump rocm-docs-core[api_reference] from 0.33.2 to 0.3…
dependabot[bot] Feb 9, 2024
30bed4e
Test suite - upgrade 5 qa perf (#305)
kiritigowda Feb 9, 2024
5c423ab
RPP Color Temperature on HOST and HIP (#271)
r-abishek Feb 9, 2024
df6e2c9
RPP Voxel 3D Tensor Add/Subtract scalar on HOST and HIP (#272)
r-abishek Feb 9, 2024
9cd217e
Merge branch 'r-abishek:develop' into develop
snehaa8 Feb 13, 2024
a4ed137
RPP Magnitude on HOST and HIP (#278)
r-abishek Feb 14, 2024
1976cbf
Bump rocm-docs-core[api_reference] from 0.34.0 to 0.34.2 in /docs/sph…
dependabot[bot] Feb 16, 2024
ec8f2f0
RPP Tensor Audio Support - Down Mixing (#296)
r-abishek Feb 16, 2024
29a5c82
RPP Voxel 3D Tensor Multiply scalar on HOST and HIP (#306)
r-abishek Feb 16, 2024
98a3c82
Test Suite Bugfix (#307)
r-abishek Feb 16, 2024
608225b
Bump rocm-docs-core[api_reference] from 0.34.2 to 0.35.0 in /docs/sph…
dependabot[bot] Feb 23, 2024
a7ef385
RPP Reduction - Tensor min and Tensor max on HOST and HIP (#260)
r-abishek Feb 24, 2024
473cde4
CI - Update precheckin.groovy
kiritigowda Feb 24, 2024
1860d66
Merge branch 'r-abishek:develop' into develop
snehaa8 Feb 29, 2024
c33af22
Bump rocm-docs-core[api_reference] from 0.35.0 to 0.35.1 in /docs/sph…
dependabot[bot] Mar 6, 2024
14f6334
Bump rocm-docs-core[api_reference] from 0.35.1 to 0.36.0 in /docs/sph…
dependabot[bot] Mar 12, 2024
95c3272
Merge branch 'master' into develop
kiritigowda Mar 12, 2024
c2c81ae
Initial commit - Log HIP Kernel
snehaa8 Mar 14, 2024
b7f57fb
Add reference outputs
snehaa8 Mar 18, 2024
725ed26
Merge branch 'sn/math_log_tensor' of https://github.com/snehaa8/rpp i…
snehaa8 Mar 18, 2024
ec2db74
Fix build error
snehaa8 Mar 18, 2024
8330b91
Initial commit - Log HOST support
snehaa8 Mar 19, 2024
87ecc6b
Fix 2d Log HOST Kernel
snehaa8 Mar 20, 2024
afe8d9a
Cleanup and improve readability
snehaa8 Mar 20, 2024
4f52ecb
Move log compute to hip_common file
snehaa8 Mar 20, 2024
98b3511
Include errors for datatype variants not supported
snehaa8 Mar 20, 2024
641f653
Docs - Bump rocm-docs-core[api_reference] from 0.36.0 to 0.37.0 in /d…
dependabot[bot] Mar 20, 2024
5568573
Link cleanup (#326)
LisaDelaney Mar 20, 2024
a6749ba
Update notes
LisaDelaney Mar 20, 2024
1380c1b
Fix exit condition in HIP kernel
snehaa8 Mar 21, 2024
c1052b1
Fix undefined issue in log when input is 0
snehaa8 Mar 21, 2024
a255906
Docs - Bump rocm-docs-core[api_reference] from 0.37.0 to 0.37.1 in /d…
dependabot[bot] Mar 22, 2024
6918d37
Split HIP kernels based on input dimensions
snehaa8 Mar 22, 2024
d3df761
RPP Voxel Flip on HIP and HOST (#285)
r-abishek Mar 23, 2024
ebecb42
RPP Vignette Tensor on HOST and HIP (#311)
r-abishek Mar 23, 2024
fc1410b
Bump rocm-docs-core[api_reference] from 0.37.1 to 0.38.0 in /docs/sph…
dependabot[bot] Mar 27, 2024
3ebd7c3
RPP Tensor Audio Support - Resample (#310)
r-abishek Apr 3, 2024
76f31df
Docs - Missing input and output images for Doxygen (#331)
r-abishek Apr 3, 2024
b83f910
Scratch buffers rename for HOST and HIP (#324)
r-abishek Apr 3, 2024
ebeb131
Update CMakeLists.txt
kiritigowda Apr 3, 2024
6930465
RPP BitwiseAND and BitwiseOR Tensor on HOST and HIP (#318)
r-abishek Apr 9, 2024
e97ece5
Merge branch 'develop' into sn/math_log_tensor
snehaa8 Apr 10, 2024
4d13956
Move Log kernel into Arithmetic operations group
snehaa8 Apr 10, 2024
1496338
Add AVX optimization support for HOST backend
snehaa8 Apr 11, 2024
1147bfe
Update CMakeLists.txt
kiritigowda Apr 12, 2024
ec640ca
Merge branch 'develop' into sn/math_log_tensor
snehaa8 Apr 16, 2024
9664cda
Add comments for helper functions in testsuite
snehaa8 Apr 23, 2024
77e14ef
Minor common-fixes for HIP (#345)
r-abishek May 7, 2024
34f3f6d
Readme Updates: --usecase=rocm (#349)
kiritigowda May 8, 2024
ab52683
RPP Tensor Audio Support - Spectrogram (#312)
r-abishek May 8, 2024
ee0d6fe
Update CHANGELOG.md (#352)
r-abishek May 8, 2024
2decd32
RPP Tensor Audio Support - Slice (#325)
r-abishek May 8, 2024
30ce1d6
RPP Tensor Audio Support - MelFilterBank (#332)
r-abishek May 8, 2024
64ae74f
RPP Tensor Normalize ND on HOST and HIP (#335)
r-abishek May 9, 2024
1a3015c
SWDEV-459739 - Remove the package obsolete setting (#353)
raramakr May 9, 2024
4cb8d4b
Audio support merge commit fixes (#354)
r-abishek May 9, 2024
206f526
Add latest changes in the test suite
sampath1117 May 14, 2024
dce7915
Merge remote-tracking branch 'abishek/develop' into sn/math_log_tensor
sampath1117 May 14, 2024
d845f72
Variable name changes
sampath1117 May 14, 2024
f1adbf0
Merge remote-tracking branch 'abishek/develop' into sn/math_log_tensor
HazarathKumarM May 30, 2024
74ba339
Merge branch 'ar/log_tensor' into sn/math_log_tensor
r-abishek Jun 6, 2024
8f2de1a
Merge pull request #249 from snehaa8/sn/math_log_tensor
r-abishek Jun 10, 2024
1e41a92
Merge branch 'develop' into ar/log_tensor
r-abishek Jun 11, 2024
a6f5826
Merge branch 'develop' into ar/log_tensor
LakshmiKumar23 Jun 13, 2024
d780318
Merge branch 'develop' into ar/log_tensor
r-abishek Jun 24, 2024
bad8c4d
Merge branch 'develop' into ar/log_tensor
kiritigowda Jun 24, 2024
0888362
Merge branch 'develop' into ar/log_tensor
r-abishek Jul 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions include/rppt_tensor_arithmetic_operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,40 @@ RppStatus rppt_magnitude_host(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr sr
RppStatus rppt_magnitude_gpu(RppPtr_t srcPtr1, RppPtr_t srcPtr2, RpptDescPtr srcDescPtr, RppPtr_t dstPtr, RpptDescPtr dstDescPtr, RpptROIPtr roiTensorPtrSrc, RpptRoiType roiType, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! \brief Logarithm operation on HOST backend
* \details Computes Log to base e(natural log) of the input for a given ND Tensor.
* Supports u8->f32, i8->f32, f16->f16 and f32->f32 datatypes.
* Uses Absolute of input for log computation and uses nextafter() if input is 0 to avoid undefined result.
* \param [in] srcPtr source tensor in HOST memory
* \param [in] srcGenericDescPtr source tensor descriptor
* \param [out] dstPtr destination tensor in HOST memory
* \param [in] dstGenericDescPtr destination tensor descriptor
* \param [in] roiTensor values to represent dimensions of input tensor
* \param [in] rppHandle RPP HOST handle created with <tt>\ref rppCreateWithBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
*/
RppStatus rppt_log_host(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *roiTensor, rppHandle_t rppHandle);

#ifdef GPU_SUPPORT
/*! \brief Logarithm operation on HIP backend
* \details Computes Log to base e(natural log) of the input for a given ND Tensor.
* Supports u8->f32, i8->f32, f16->f16 and f32->f32 datatypes.
* Uses Absolute of input for log computation and uses nextafter() if input is 0 to avoid undefined result.
* \param [in] srcPtr source tensor in HIP memory
* \param [in] srcGenericDescPtr source tensor descriptor
* \param [out] dstPtr destination tensor in HIP memory
* \param [in] dstGenericDescPtr destination tensor descriptor
* \param [in] roiTensor values to represent dimensions of input tensor
* \param [in] rppHandle RPP HIP handle created with <tt>\ref rppCreateWithStreamAndBatchSize()</tt>
* \return A <tt> \ref RppStatus</tt> enumeration.
* \retval RPP_SUCCESS Successful completion.
* \retval RPP_ERROR* Unsuccessful completion.
*/
RppStatus rppt_log_gpu(RppPtr_t srcPtr, RpptGenericDescPtr srcGenericDescPtr, RppPtr_t dstPtr, RpptGenericDescPtr dstGenericDescPtr, Rpp32u *roiTensor, rppHandle_t rppHandle);
#endif // GPU_SUPPORT

/*! @}
*/

Expand Down
6 changes: 6 additions & 0 deletions src/include/cpu/rpp_cpu_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6501,4 +6501,10 @@ inline void compute_remap_src_loc(Rpp32f rowLoc, Rpp32f colLoc, Rpp32s &srcLoc,
srcLoc = (rowLoc * stride) + colLoc * channels;
}

inline void compute_log_16_host(__m256 *p)
{
p[0] = log_ps(p[0]); // log compute
p[1] = log_ps(p[1]); // log compute
}

#endif //RPP_CPU_COMMON_H
15 changes: 15 additions & 0 deletions src/include/hip/rpp_hip_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1869,6 +1869,21 @@ __device__ __forceinline__ float rpp_hip_math_sinc(float x)
return (fabsf(x) < 1e-5f) ? (1.0f - x * x * ONE_OVER_6) : sinf(x) / x;
}

__device__ __forceinline__ void rpp_hip_math_log(d_float8 *src_f8, d_float8 *dst_f8)
{
for(int i = 0; i < 8; i++)
src_f8->f1[i] = (!src_f8->f1[i]) ? std::nextafter(0.0f, 1.0f) : fabsf(src_f8->f1[i]);

dst_f8->f1[0] = __logf(src_f8->f1[0]);
dst_f8->f1[1] = __logf(src_f8->f1[1]);
dst_f8->f1[2] = __logf(src_f8->f1[2]);
dst_f8->f1[3] = __logf(src_f8->f1[3]);
dst_f8->f1[4] = __logf(src_f8->f1[4]);
dst_f8->f1[5] = __logf(src_f8->f1[5]);
dst_f8->f1[6] = __logf(src_f8->f1[6]);
dst_f8->f1[7] = __logf(src_f8->f1[7]);
}

// /******************** DEVICE RANDOMIZATION HELPER FUNCTIONS ********************/

template<typename T>
Expand Down
1 change: 1 addition & 0 deletions src/modules/cpu/host_tensor_arithmetic_operations.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ SOFTWARE.
#include "kernel/subtract_scalar.hpp"
#include "kernel/multiply_scalar.hpp"
#include "kernel/magnitude.hpp"
#include "kernel/log.hpp"

#endif // HOST_TENSOR_ARITHMETIC_OPERATIONS_HPP
Loading