Skip to content

[Hexagon] [CMake] Fix v66 build issue#17169

Merged
tqchen merged 1 commit into
apache:mainfrom
quic-sanirudh:fix_build_issues_for_older_archs
Jul 22, 2024
Merged

[Hexagon] [CMake] Fix v66 build issue#17169
tqchen merged 1 commit into
apache:mainfrom
quic-sanirudh:fix_build_issues_for_older_archs

Conversation

@quic-sanirudh

@quic-sanirudh quic-sanirudh commented Jul 18, 2024

Copy link
Copy Markdown
Contributor

This patch fixes the issue mentioned in #17163.

The issue was because some files that are built into the runtime depend on architecture features that are only available starting from v68. Hence, we should not link them into the runtime if the architecture mentioned is v66 or v65.

@chayliu-ecarx

Copy link
Copy Markdown

with SDK4.5 and added your modifications about the cmake file, building errors like this:

Hexagon_SDK_4_5/libs/qhl_hvx/inc/internal/qhmath_hvx_vector.h:837:66: error: use of undeclared identifier 'Q6_Vsf_equals_Vqf32' vout_linear_interp = Q6_V_vmux_QVV(pred_linear_interp_right, Q6_Vsf_equals_Vqf32(output_linear_interp_right_vqf32), vout_linear_interp);

This patch fixes the issue mentioned in #17163.

The issue was because some files that are built into the runtime depend on architecture features that are only available starting from v68. Hence, we should not link them into the runtime if the architecture mentioned is v66 or v65.

with SDK4.5 and added your modifications about the cmake file, building errors like this:

Hexagon_SDK_4_5/libs/qhl_hvx/inc/internal/qhmath_hvx_vector.h:837:66: error: use of undeclared identifier 'Q6_Vsf_equals_Vqf32'
vout_linear_interp = Q6_V_vmux_QVV(pred_linear_interp_right, Q6_Vsf_equals_Vqf32(output_linear_interp_right_vqf32), vout_linear_interp);

@chayliu-ecarx

Copy link
Copy Markdown

after adding the following cmake modification:

 if((USE_HEXAGON_QHL) AND (${supported_arch_index} GREATER -1))

building succeed!

@quic-sanirudh

quic-sanirudh commented Jul 18, 2024

Copy link
Copy Markdown
Contributor Author

after adding the following cmake modification:

 if((USE_HEXAGON_QHL) AND (${supported_arch_index} GREATER -1))

building succeed!

Right, the problem is that Starting 4.0, Hexagon SDK supports v68, so v68 libraries are also included in QHL_HVX libs. Excluding just the files not supported for v68 when we mention a lower architecture is a problem because the exact files that need to be excluded changes with each Hexagon SDK release. The best way is to just use Hexagon SDK 3.5 which is the last version that does not have v68 support and so it should work without any change. Or the other option is to pass USE_HEXAGON_QHL=OFF in your cmake command

@quic-sanirudh quic-sanirudh force-pushed the fix_build_issues_for_older_archs branch from 5fc90d0 to b2ab420 Compare July 18, 2024 09:23
@quic-sanirudh

Copy link
Copy Markdown
Contributor Author

@tvm-bot rerun

This patch fixes the issue mentioned in [apache#17163](apache#17163)
@quic-sanirudh quic-sanirudh force-pushed the fix_build_issues_for_older_archs branch from b2ab420 to 772a9ca Compare July 19, 2024 06:36
@quic-sanirudh

Copy link
Copy Markdown
Contributor Author

cc @csullivan @abhikran-quic

@abhikran-quic abhikran-quic left a comment

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.

LGTM. Thank you @quic-sanirudh!

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