Skip to content

feat!: Add tensor size check to kernels#1268

Open
andflo-Arm wants to merge 1 commit intomainfrom
pr/tensor-size-checks
Open

feat!: Add tensor size check to kernels#1268
andflo-Arm wants to merge 1 commit intomainfrom
pr/tensor-size-checks

Conversation

@andflo-Arm
Copy link
Contributor

@andflo-Arm andflo-Arm commented Mar 12, 2026

The size check implies a tensor size restriction to 2^31-1 bytes. Kernel
configurations larger than that will no longer validate.

Resolves: COMPMID-8697

Change-Id: I54f73ade5cb4a0d34d831505d83d1d7ef526b5db

@gunes-arm
Copy link
Contributor

I didn't look yet, but it'd be useful anyways. Could you explain why this is a breaking change in the description? And, I suppose we need to add smth like BREAKING CHANGE (?) somewhere

The size check implies a tensor size restriction to 2^31-1 bytes. Kernel
configurations larger than that will no longer validate.

Resolves: COMPMID-8697
Signed-off-by: Andreas Flöjt <andreas.floejt@arm.com>
Change-Id: I54f73ade5cb4a0d34d831505d83d1d7ef526b5db
@andflo-Arm andflo-Arm force-pushed the pr/tensor-size-checks branch from 493638b to 773dc2f Compare March 13, 2026 08:41
@andflo-Arm
Copy link
Contributor Author

I didn't look yet, but it'd be useful anyways. Could you explain why this is a breaking change in the description? And, I suppose we need to add smth like BREAKING CHANGE (?) somewhere

Done. The exclamation mark serves the purpose of conveying breaking changes.

const size_t one_channel = 1u;
ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(
input, one_channel, DataType::QASYMM8, DataType::QASYMM8_SIGNED, DataType::S32, DataType::F16, DataType::F32);
ARM_COMPUTE_RETURN_ERROR_ON_DATA_TYPE_CHANNEL_NOT_IN(output, one_channel, DataType::S32, DataType::S64);
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 a bit weird. I know it existed before but the comment header of the operator says it's either U32 or S32. I'm not sure why it's checking S64 here.

Copy link
Contributor

Choose a reason for hiding this comment

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

We added support for S64 a while back, maybe we forgot to update the header. Check MLCE-1089

Copy link
Contributor

Choose a reason for hiding this comment

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

Is U32 supported?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

Copy link
Contributor

Choose a reason for hiding this comment

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

validate() says otherwise :D

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.

3 participants