-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Make CpuMath not depending on ML.Core again #1724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tools-local/Microsoft.ML.InternalCodeAnalyzer/BestFriendAnalyzer.cs
Outdated
Show resolved
Hide resolved
(nit) I think it makes more sense for this file to live outside of the Refers to: src/Microsoft.ML.Core/Properties/PublicKey.cs:1 in 7f374c6. [](commit_id = 7f374c6, deletion_comment = False) |
This reverts commit 911aee6.
tools-local/Microsoft.ML.InternalCodeAnalyzer/BestFriendAnalyzer.cs
Outdated
Show resolved
Hide resolved
tools-local/Microsoft.ML.InternalCodeAnalyzer/ContractsCheckAnalyzer.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just the question about if using #if PRIVATE_CONTRACTS
as the name still makes sense, and a minor question about the old namespace.
Other than those 2 things, this looks good.
tools-local/Microsoft.ML.InternalCodeAnalyzer/ContractsCheckAnalyzer.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixes #1688.
CpuMath
project now includesContract.cs
inML.Core
. The fileContract.cs
contains some if-else macros for distinguishing the part for general ML.NET (namespace:Microsoft.ML
) from the part forCpuMath
(namespace:Microsoft.ML.Runtime.Internal.CpuMath.Core
). TheBestFriendAttribute
inML.Core
(namespace: Microsoft.ML) andCpuMath
(namespace:Microsoft.ML.Runtime.Internal.CpuMath.Core
) follow the same pattern for the same reason.BestFriendAnalyzer
is also modified to support the two variants ofBestFriend
attributes.Besides, we move
PublicKey
into another file,PublicKey.cs,
to avoid includingAssemblyInfo.cs
twice in CpuMath project.