You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: "Microsoft.ML currently supports 'x64' and 'x86' processor" when target runtime is *linux-arm* or *linux-arm64* #6588
System Information (please complete the following information):
OS & Version: Linux 5.19.0-32-generic 22.04.1-Ubuntu
ML.NET Version: 2.0.1
.NET Version: 6.0
Describe the bug
Unable to build a project if target runtime is set to either linux-arm or linux-arm64.
Error:
~/.nuget/packages/microsoft.ml/2.0.1/build/netstandard2.0/Microsoft.ML.targets(16,5): error :
Microsoft.ML currently supports 'x64' and 'x86' processor architectures.
Please ensure your application is targeting 'x64' or 'x86'.
Special case .NET Core portable applications. When building a portable .NET Core app,
the PlatformTarget is empty, and you don't know until runtime (i.e. which dotnet.exe)
what processor architecture will be used.
-->
<ErrorCondition="('$(PlatformTarget)' != 'x64' AND '$(PlatformTarget)' != 'x86') AND
('$(OutputType)' == 'Exe' OR '$(OutputType)'=='WinExe') AND
!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(PlatformTarget)' == '')"
Text="Microsoft.ML currently supports 'x64' and 'x86' processor architectures. Please ensure your application is targeting 'x64' or 'x86'." />
</Target>
To Reproduce
Create a console project, add a reference to Microsoft.ML 2.0.1 package, try to build the project with target runtime set to either linux-arm or linux-arm64.
Thanks for this issue @genemars. Added this to our backlog.
Thanks for helping out @ProKn1fe. Re: TorchSharp ARM support, as far as I know, PyTorch doesn't support ARM out of the box (unless you build from source), so any limitations in the underlying libtorch library would also be present in TorchSharp.
I have added the required item to the publish file, but the project still isn't functioning as expected. Could you please suggest any alternative solutions if you have any?
Additionally, could this issue be related to a CPU warning that I noticed? Your input would be greatly appreciated.
Thank you for your assistance.
Best regards @ProKn1fe
I added this into csproj file and it worked for me, thanks! Btw why they show such error message? I thought maybe it will not work in prod, but there also fine.
I believe part of ML.Net can work on linux-arm64 platform, but other part cannot. E.g. I encountered issue with tensorflow: Unable to load shared library 'tensorflow' or one of its dependencies.
Activity
ProKn1fe commentedon Mar 5, 2023
You can add this into publish profile and it will build.
genemars commentedon Mar 6, 2023
@ProKn1fe thanks a lot! It worked.
I wonder if is this by design and if there are actually any limitations when using ML.NET for ARM architectures?
ProKn1fe commentedon Mar 6, 2023
@genemars i'm trying to train model on Radxa Rock-5b board and i already catch some random errors which didn't throw on windows with same code.
ProKn1fe commentedon Mar 6, 2023
Also TorchSharp don't work on arm at all.
luisquintanilla commentedon Mar 29, 2023
Thanks for this issue @genemars. Added this to our backlog.
Thanks for helping out @ProKn1fe. Re: TorchSharp ARM support, as far as I know, PyTorch doesn't support ARM out of the box (unless you build from source), so any limitations in the underlying libtorch library would also be present in TorchSharp.
alvstw commentedon Apr 18, 2023
FieldAwareFactorizationMachine is not supported in macOS ARM (CpuMathNative related issue). Is it possible to support it as well?
BesTuerzt commentedon Sep 17, 2024
I have added the required item to the publish file, but the project still isn't functioning as expected. Could you please suggest any alternative solutions if you have any?
Additionally, could this issue be related to a CPU warning that I noticed? Your input would be greatly appreciated.
Thank you for your assistance.
Best regards
@ProKn1fe
hflexgrig commentedon Feb 21, 2025
I added this into csproj file and it worked for me, thanks! Btw why they show such error message? I thought maybe it will not work in prod, but there also fine.
stasberkov commentedon Dec 27, 2025
I believe part of ML.Net can work on linux-arm64 platform, but other part cannot. E.g. I encountered issue with tensorflow: Unable to load shared library 'tensorflow' or one of its dependencies.