Skip to content

Crop - Tensor implementation on hip and host#83

Merged
kiritigowda merged 12 commits intoROCm:masterfrom
r-abishek:ar/opt_crop
Dec 10, 2021
Merged

Crop - Tensor implementation on hip and host#83
kiritigowda merged 12 commits intoROCm:masterfrom
r-abishek:ar/opt_crop

Conversation

@r-abishek
Copy link
Copy Markdown
Member

@rrawther @asalmanp This PR adds the tensor implementation for crop on hip and host, and the corresponding unit tests and performance tests.

#include <hip/hip_runtime.h>
#include <hip/hip_ext.h>
#include <hip/hip_fp16.h>
#include <hip/hcc_detail/hip_vector_types.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't include files from the hcc_detail folder from the hip. including from the hip/hip_fp16 header should give you access to all the HIP's fp16 functionalities.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted back the headers without hcc_detail

@kiritigowda kiritigowda self-assigned this Dec 7, 2021
@kiritigowda kiritigowda added the enhancement New feature or request label Dec 7, 2021
Copy link
Copy Markdown
Member

@AryanSalmanpour AryanSalmanpour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • @paveltc to verify the unit tests for this PR.

inline RppStatus rpp_load48_u8pkd3_to_u8pln3(Rpp8u *srcPtr, __m128i *px)
{
__m128i pxSrc[8];
__m128i pxMask = _mm_setr_epi8(0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8, 11, 12, 13, 14, 15);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pxMask and pxMaskRGB is repeatedly used in many functions. Consider defining it as global constant

}

// Uncomment to run test case with an ltrbROI override
/*for (i = 0; i < images; i++)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to pass parameters through arguments instead of commenting and uncommenting code.

Copy link
Copy Markdown
Contributor

@rrawther rrawther left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can me merged after unit-tests pass and approval from @asalmanp

@paveltc
Copy link
Copy Markdown
Contributor

paveltc commented Dec 10, 2021

@asalmanp @rrawther @r-abishek This PR passes all unit tests.

@kiritigowda kiritigowda merged commit dbf682b into ROCm:master Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants