Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding the Vector64<T> type to the S.R.Intrinsics assembly#26432

Merged
tannergooding merged 1 commit into
dotnet:masterfrom
tannergooding:hwintrin-vector64
Jan 26, 2018
Merged

Adding the Vector64<T> type to the S.R.Intrinsics assembly#26432
tannergooding merged 1 commit into
dotnet:masterfrom
tannergooding:hwintrin-vector64

Conversation

@tannergooding
Copy link
Copy Markdown
Member

namespace System.Runtime.Intrinsics
{
[StructLayout(LayoutKind.Sequential, Size = 8)]
public struct Vector64<T> where T : struct {}
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we including private fields in the reference assemblies now? I think I remember some thread on the topic...

Asking since we added private fields here: dotnet/coreclr#15897

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not clear on if we need the [Intrinsic] attribute (which was already missing) or if we need the Debugger* attributes, which are new.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we including private fields in the reference assemblies now? I think I remember some thread on the topic...

Yes. See the following for more details.

dotnet/buildtools#1859
#26286
http://blog.paranoidcoding.com/2016/02/15/are-private-members-api-surface.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the DebuggerTypeProxy attributes, I don't see any others in a ref file. So I'd assume we don't need them in the ref assembly. Plus, since it points to a type that is internal, it can't be. And lastly, the debugger doesn't know anything about 'ref' assemblies.

The [Intrinsic] attribute is internal, right? So it can't be in the ref assembly.

@tannergooding
Copy link
Copy Markdown
Member Author

This was already added to corlib, but hasn't been added here yet.

public struct Vector256<T> where T : struct {}
}

namespace System.Runtime.Intrinsics.X86
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.

Might be good to have one file per namespace
I was adding ARM64 intrinsics to a separate file

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be good to have one file per namespace

I agree. However, it doesn't appear any of the other reference sources do this...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering the same thing. My initial thought was that the others are in a single file because they are generated by a tool. But maybe we consciously made the decision to have a single file for the whole ref assembly.

@stephentoub @weshaggard @ericstj @KrzysztofCwalina - thoughts/opinions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I find the current ref C# files hard to read. There are no line breaks between namespaces/classes and no breaks between things like properties vs methods/etc.

Even if being in a single file is a conscious decision, it might be worthwhile changing the format slightly to make it more readable.

@sdmaclea
Copy link
Copy Markdown
Contributor

I didn't create PR for corefx, since none of the ARM64 intrinsic API's have been approved.

@sdmaclea
Copy link
Copy Markdown
Contributor

sdmaclea commented Jan 19, 2018

If you want them, I have a corefx patch for all the open API Proposals. I have been using it for testing.

I wasn't going to merge until API was supported on CoreCLR and API was approved.

@tannergooding
Copy link
Copy Markdown
Member Author

I wasn't going to merge until API was supported on CoreCLR and API was approved.

Ah, I had thought this one in particular was approved. I had just discovered that the API was missing when testing out the DebuggerDisplayAttribute.

Copy link
Copy Markdown
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks good. The other questions can be resolved in a follow up, if necessary.

namespace System.Runtime.Intrinsics
{
[StructLayout(LayoutKind.Sequential, Size = 8)]
public struct Vector64<T> where T : struct {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we including private fields in the reference assemblies now? I think I remember some thread on the topic...

Yes. See the following for more details.

dotnet/buildtools#1859
#26286
http://blog.paranoidcoding.com/2016/02/15/are-private-members-api-surface.html

namespace System.Runtime.Intrinsics
{
[StructLayout(LayoutKind.Sequential, Size = 8)]
public struct Vector64<T> where T : struct {}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the DebuggerTypeProxy attributes, I don't see any others in a ref file. So I'd assume we don't need them in the ref assembly. Plus, since it points to a type that is internal, it can't be. And lastly, the debugger doesn't know anything about 'ref' assemblies.

The [Intrinsic] attribute is internal, right? So it can't be in the ref assembly.

@tannergooding
Copy link
Copy Markdown
Member Author

I think this looks good. The other questions can be resolved in a follow up, if necessary.

@eerhardt, going to add the private fields. Will merge after that passes all the CI checks.

@eerhardt
Copy link
Copy Markdown
Member

going to add the private fields

You are going to add them to all the Vector structs, right? If so, that plan sounds good to me.

@tannergooding
Copy link
Copy Markdown
Member Author

Updated to include a dummy private field, as per the convention in dotnet/buildtools#1859

@tannergooding
Copy link
Copy Markdown
Member Author

Jobs are all hung trying to push XUnit results. CC. @mmitche

@mmitche
Copy link
Copy Markdown
Member

mmitche commented Jan 25, 2018

cc @dotnet/dnceng. @MattGal sent out a notice about some processing delays a few mins ago.

@tannergooding
Copy link
Copy Markdown
Member Author

test Linux x64 Release Build please
test Windows x86 Release Build please
(I figured ~8 hours of attempting to upload results was enough time)

@MattGal
Copy link
Copy Markdown
Member

MattGal commented Jan 26, 2018

@tannergooding we understand the issue and work processing should be proceeding at normal pace now, so please kick off all you'd like.

@tannergooding tannergooding merged commit 2cdb8eb into dotnet:master Jan 26, 2018
@karelz karelz added this to the 2.1.0 milestone Feb 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants