Skip to content

Conversation

@Mousius
Copy link
Member

@Mousius Mousius commented Aug 16, 2022

Following on from #12454 this patch removes the utility functions in favour of the centralised target.features property.

@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch 3 times, most recently from 341389d to 523f186 Compare August 16, 2022 16:19
@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from 523f186 to dcc1ddd Compare August 25, 2022 09:46
@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from dcc1ddd to df0ad05 Compare October 13, 2022 16:58
@areusch areusch added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it and removed needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it labels Oct 19, 2022
Following on from apache#12454 this patch removes the utility functions in favour of the centralised `target.features` property.
@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from df0ad05 to b3dfa48 Compare October 20, 2022 09:30
This removes many references to `is_aarch64` in favour of `is_asimd` for which it was often a proxy.

Also relaxed a Compute Library test as the schedules are now different with proper arch detection
@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from 6b7629b to 960a519 Compare October 20, 2022 11:28
@Mousius Mousius marked this pull request as ready for review October 20, 2022 13:50
@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from 678f54c to 6df4400 Compare October 20, 2022 13:54
@tvm-bot
Copy link
Collaborator

tvm-bot commented Oct 20, 2022

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

Looks good, apart from one small thing!

@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from 6df4400 to 2870b0d Compare October 21, 2022 11:41
@Mousius
Copy link
Member Author

Mousius commented Oct 21, 2022

@lhutton1 fixed the typo, PTAL 😸

@Mousius Mousius force-pushed the target-parser-aprofile-rollout branch from ce573d3 to 4561d40 Compare October 24, 2022 09:01
Copy link
Contributor

@lhutton1 lhutton1 left a comment

Choose a reason for hiding this comment

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

LGTM!

@lhutton1 lhutton1 merged commit 3131cdc into apache:main Oct 24, 2022
@lhutton1
Copy link
Contributor

Thanks @Mousius!

@Mousius Mousius deleted the target-parser-aprofile-rollout branch October 24, 2022 12:32
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 10, 2022
Following on from apache#12454 this patch removes the utility functions in favour of the centralised `target.features` property.
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
Following on from apache#12454 this patch removes the utility functions in favour of the centralised `target.features` property.
lhutton1 added a commit to lhutton1/tvm that referenced this pull request Aug 3, 2023
32-bit targets

apache#12455 slightly altered the behaviour
when selecting an int8 conv2d schedule. Previously conditions that
decide which schedule to select used `is_aarch64` which checks for the
existance of `aarch64` in the target triple. However, the conditions now
use `has_asimd` which is true if `aarch64` exists in the target triple
OR `+neon` is used in the mattr.

Both `conv2d_NHWC_quantized_interleaved.arm_cpu` and
`depthwise_conv2d_nhwc.arm_cpu` makes calls to LLVM intrinsics that
require both `aarch64` and `+neon`. But in the case of the target
`rasp4b`, the updated conditions result in compilation failure since
the target has `+neon` but doesn't have `aarch64` in the target triple.
The conditions have been updated to fix the compilation failure.

Likewise, the previous behaviour of the condition for
`conv2d_nhwc_spatial_pack.arm_cpu` has been restored ensure a program
with a 32-bit target can still be compiled.

Finally, we should only select the `depthwise_conv2d_nhwc_dsp.arm_cpu`
schedule when a backend that understands `pragma_import_c` has been
selected, i.e. "c".

For a more detailed discussion of the issue please see:
https://discuss.tvm.apache.org/t/tflite-llvm-llvm-error-when-compiling-tflite-model/15411

Change-Id: Idcf541ecdb7fee7d392bfbe5bd1f7cb478408938
ekalda pushed a commit that referenced this pull request Aug 4, 2023
…-bit targets (#15468)

[Relay][Strategy] Fix `arm_cpu` int8 conv2d schedule selection for
32-bit targets

#12455 slightly altered the behaviour
when selecting an int8 conv2d schedule. Previously conditions that
decide which schedule to select used `is_aarch64` which checks for the
existance of `aarch64` in the target triple. However, the conditions now
use `has_asimd` which is true if `aarch64` exists in the target triple
OR `+neon` is used in the mattr.

Both `conv2d_NHWC_quantized_interleaved.arm_cpu` and
`depthwise_conv2d_nhwc.arm_cpu` makes calls to LLVM intrinsics that
require both `aarch64` and `+neon`. But in the case of the target
`rasp4b`, the updated conditions result in compilation failure since
the target has `+neon` but doesn't have `aarch64` in the target triple.
The conditions have been updated to fix the compilation failure.

Likewise, the previous behaviour of the condition for
`conv2d_nhwc_spatial_pack.arm_cpu` has been restored ensure a program
with a 32-bit target can still be compiled.

Finally, we should only select the `depthwise_conv2d_nhwc_dsp.arm_cpu`
schedule when a backend that understands `pragma_import_c` has been
selected, i.e. "c".

For a more detailed discussion of the issue please see:
https://discuss.tvm.apache.org/t/tflite-llvm-llvm-error-when-compiling-tflite-model/15411
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.

4 participants