Skip to content

Error: "Microsoft.ML currently supports 'x64' and 'x86' processor" when target runtime is *linux-arm* or *linux-arm64* #6588

Open

Description

@genemars

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'.

<Target Name="_CheckForUnsupportedPlatformTarget"
Condition="'$(EnableMLUnsupportedPlatformTargetCheck)' == 'true'"
AfterTargets="_CheckForInvalidConfigurationAndPlatform">
<!--
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.
-->
<Error Condition="('$(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.

Expected behavior
Should build without errors.

Screenshot
Schermata del 2023-03-02 18-08-15

Activity

  1. ghost added
    untriagedNew issue has not been triaged
    on Mar 2, 2023
  2. ProKn1fe commented on Mar 5, 2023

    @ProKn1fe

    You can add this into publish profile and it will build.

    <EnableMLUnsupportedPlatformTargetCheck>false</EnableMLUnsupportedPlatformTargetCheck>
    
  3. genemars commented on Mar 6, 2023

    @genemars
    Author

    @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?

  4. ProKn1fe commented on Mar 6, 2023

    @ProKn1fe

    @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.

  5. ProKn1fe commented on Mar 6, 2023

    @ProKn1fe

    Also TorchSharp don't work on arm at all.

  6. added this to the ML.NET 3.0 milestone on Mar 29, 2023
  7. ghost removed
    untriagedNew issue has not been triaged
    on Mar 29, 2023
  8. luisquintanilla commented on Mar 29, 2023

    @luisquintanilla
    Contributor

    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.

  9. alvstw commented on Apr 18, 2023

    @alvstw

    FieldAwareFactorizationMachine is not supported in macOS ARM (CpuMathNative related issue). Is it possible to support it as well?

  10. BesTuerzt commented on Sep 17, 2024

    @BesTuerzt

    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

  11. hflexgrig commented on Feb 21, 2025

    @hflexgrig

    You can add this into publish profile and it will build.

    <EnableMLUnsupportedPlatformTargetCheck>false</EnableMLUnsupportedPlatformTargetCheck>
    

    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.

  12. stasberkov commented on Dec 27, 2025

    @stasberkov

    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.

  13. added
    Priority:1Work that is critical for the release, but we could probably ship without
    area-NativeNative libraries, platform support, and architecture-specific code
    and removed on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority:1Work that is critical for the release, but we could probably ship withoutarea-NativeNative libraries, platform support, and architecture-specific codegreendevelopment

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions