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

[luci/pass] Add fp32_to_uint8_cast to header #14296

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

01000-you
Copy link
Contributor

@01000-you 01000-you commented Nov 4, 2024

This commit add the fp32_to_uint8_cast in the header file.

Related Issue : #13480
Draft PR: #13585

ONE-DCO-1.0-Signed-off-by: y01000.you [email protected]

@01000-you 01000-you changed the title Extend cal_offset function to 2D and add fp32_to_uint8_cast in header Extend cal_offset function to 2D Nov 4, 2024
@01000-you 01000-you changed the title Extend cal_offset function to 2D [luci/pass] Extend cal_offset function to 2D Nov 4, 2024
@seanshpark
Copy link
Contributor

plz check #13480 (comment)

@seanshpark seanshpark added the PR/NO MERGE Please don't merge. I'm still working on this :) label Nov 5, 2024
@@ -292,11 +292,9 @@ uint32_t cal_offset(loco::TensorShape &dimension, uint32_t *indices)
indices[2] * dimension.dim(3).value() + indices[3];
}

uint32_t cal_offset_2d(loco::TensorShape &dimension, uint32_t *indices)
uint32_t cal_offset_2d(loco::TensorShape &dimension, uint32_t indices[2])
Copy link
Contributor

Choose a reason for hiding this comment

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

This is odd.
I don't like adding 2d suffix and don't like adding [2] too.

Copy link
Contributor Author

@01000-you 01000-you Nov 5, 2024

Choose a reason for hiding this comment

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

I understand that it's not easy to add it like that.
I can use the original functioncal_offset. I will remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think caller code would come up with a nice code.
It would be better to revise existing cal_offset to accept current 4d and new 2d.

Copy link
Contributor

Choose a reason for hiding this comment

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

And it would be better to split these two.
They don't have common context.

@01000-you 01000-you force-pushed the quantutils branch 3 times, most recently from d5740bb to 3bd0fa2 Compare November 5, 2024 11:22
@seanshpark
Copy link
Contributor

Current change and commit title/description doesn't match.
plz fix.

@01000-you 01000-you changed the title [luci/pass] Extend cal_offset function to 2D [luci/pass] Add fp32_to_uint8_cast to header Nov 6, 2024
@seanshpark
Copy link
Contributor

Current first commit message is

Implement cal_offset_2d and add fp32_to_uint8_cast in header
This commit declares the fp32_to_uint8_cast function in the QuantizationUtils header file and implements the cal_offset_2d function in the QuantizationUtils source file.

@01000-you 01000-you force-pushed the quantutils branch 2 times, most recently from 3f3d46a to 2193541 Compare November 19, 2024 11:22
@01000-you
Copy link
Contributor Author

Current first commit message is

Fixed it, thank you

@seanshpark
Copy link
Contributor

Your commit message doesn't match with the change.

@01000-you 01000-you force-pushed the quantutils branch 2 times, most recently from 2e6da7c to abdc9c5 Compare November 20, 2024 05:06
@seanshpark
Copy link
Contributor

can you plz add [luci/pass] prefix to commit msg?

image

This commit add the fp32_to_uint8_cast in the header file.

ONE-DCO-1.0-Signed-off-by: y01000.you <[email protected]>
@seanshpark seanshpark removed the PR/NO MERGE Please don't merge. I'm still working on this :) label Nov 28, 2024
Copy link
Contributor

@seanshpark seanshpark left a comment

Choose a reason for hiding this comment

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

LGTM

@seanshpark seanshpark merged commit 0002635 into Samsung:master Nov 28, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants