Skip to content

Conversation

changjua
Copy link

Add implementation of strmm kernel based on the SME1 architecture.

@changjua changjua force-pushed the topic/strmm_direct_sme1 branch from fe3eb6c to c29f60c Compare September 18, 2025 09:43
@changjua
Copy link
Author

@martin-frbg
Five checks are failing. Can you please let me know how to resolve these failures.

@changjua changjua force-pushed the topic/strmm_direct_sme1 branch from c29f60c to 5d80985 Compare September 19, 2025 08:53
@martin-frbg
Copy link
Collaborator

Looks like the placement of your changes in setparam-ref.c is at odds with the location of the new symbols in the DYNAMIC_ARCH part of common_param.h

@changjua changjua force-pushed the topic/strmm_direct_sme1 branch from 5d80985 to 8173910 Compare September 21, 2025 01:52
@changjua
Copy link
Author

Hi Martin. Thanks for your quick review. It’s very helpful. But Three checks are still failing.

@martin-frbg
Copy link
Collaborator

The OSX_OpenMP_Clang_cmake and Windows_mingw_gmake jobs timing out (causing the overall AzureCI job to fail) is certainly unrelated to your change. The Windows on Arm (LLVM) linker appears to be seeing duplicate symbols between the LNUN and LNLN builds of your code - suggesting there is something wrong with code selection in the CMake build as
this is a plain ARMV8 target and should not be building the SME kernels at all. (Note this may not be your fault, but part of a wider issue I'm hoping to address in #5423)

2025-09-21T07:50:36.3044203Z lld-link: error: duplicate symbol: __arm_tpidr2_save
2025-09-21T07:50:36.3044681Z >>> defined at kernel\CMakeFiles\kernel.dir\CMakeFiles\strmm_direct_LNUN.c.obj
2025-09-21T07:50:36.3044990Z 
2025-09-21T07:50:36.3045106Z lld-link: error: duplicate symbol: __arm_tpidr2_restore
2025-09-21T07:50:36.3045455Z >>> defined at kernel\CMakeFiles\kernel.dir\CMakeFiles\strmm_direct_LNUN.c.obj
2025-09-21T07:50:36.3045857Z 
2025-09-21T07:50:36.3045968Z lld-link: error: duplicate symbol: __arm_tpidr2_save
2025-09-21T07:50:36.3046317Z >>> defined at kernel\CMakeFiles\kernel.dir\CMakeFiles\strmm_direct_LNLN.c.obj
2025-09-21T07:50:36.3046564Z 
2025-09-21T07:50:36.3046675Z lld-link: error: duplicate symbol: __arm_tpidr2_restore
2025-09-21T07:50:36.3047019Z >>> defined at kernel\CMakeFiles\kernel.dir\CMakeFiles\strmm_direct_LNLN.c.obj
2025-09-21T07:50:36.3047271Z 

@changjua
Copy link
Author

To resolve the duplicate symbol issue with _arm_tpidr2_restore and _arm_tpidr2_save when building for non-SME targets (e.g., ARMv8), I propose conditionally including sme_abi.h only when SME is supported:

#if defined(__ARM_FEATURE_SME) && defined(clang) && (clang_major >= 16)
#include "sme_abi.h"
#endif

This ensures that SME-specific ABI routines are only included when the target architecture and compiler support them, avoiding symbol conflicts in non-SME builds.

Let me know if this approach looks good or if further adjustments are needed.

@changjua changjua force-pushed the topic/strmm_direct_sme1 branch from 8173910 to ea2890d Compare September 22, 2025 05:03
@changjua
Copy link
Author

@martin-frbg
Some checks are still failing. Can you please let me know how to resolve these failures again

@martin-frbg
Copy link
Collaborator

The failing ones are all unrelated to your changes (as I mentioned earlier - these are x86 jobs that end up running on slow hardware sometimes)

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