-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[X86][AMX] Support AMX-MOVRS #115151
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
Merged
Merged
[X86][AMX] Support AMX-MOVRS #115151
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3b6510d
[X86][AMX] Support AMX-MOVRS
MalaySanghi e7a09d7
update test
MalaySanghi b63f9a6
Merge branch 'main' into ms_amxMovrs
MalaySanghi 193420c
review
MalaySanghi cc1141a
Merge branch 'main' into ms_amxMovrs
MalaySanghi cd6090f
review2
MalaySanghi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*===-------- amxmovrsintrin.h - AMX MOVRS intrinsics -*- C++ -*---------=== | ||
* | ||
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
* See https://llvm.org/LICENSE.txt for license information. | ||
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
* | ||
* ===-------------------------------------------------------------------=== */ | ||
|
||
#ifndef __IMMINTRIN_H | ||
#error "Never use <amxmovrsintrin.h> directly; include <immintrin.h> instead." | ||
#endif /* __IMMINTRIN_H */ | ||
|
||
#ifndef __AMXMOVRSINTRIN_H | ||
#define __AMXMOVRSINTRIN_H | ||
#ifdef __x86_64__ | ||
|
||
#define __DEFAULT_FN_ATTRS_MOVRS \ | ||
__attribute__((__always_inline__, __nodebug__, __target__("amx-movrs"))) | ||
|
||
#define _tile_loaddrs(dst, base, stride) \ | ||
__builtin_ia32_tileloaddrs64((dst), ((const void *)(base)), \ | ||
(__SIZE_TYPE__)(stride)) | ||
#define _tile_stream_loaddrs(dst, base, stride) \ | ||
__builtin_ia32_tileloaddrst164((dst), ((const void *)(base)), \ | ||
(__SIZE_TYPE__)(stride)) | ||
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_MOVRS | ||
_tile_loaddrs_internal(unsigned short m, unsigned short n, const void *base, | ||
__SIZE_TYPE__ stride) { | ||
return __builtin_ia32_tileloaddrs64_internal(m, n, base, | ||
(__SIZE_TYPE__)(stride)); | ||
} | ||
static __inline__ _tile1024i __DEFAULT_FN_ATTRS_MOVRS | ||
_tile_loaddrst1_internal(unsigned short m, unsigned short n, const void *base, | ||
__SIZE_TYPE__ stride) { | ||
return __builtin_ia32_tileloaddrst164_internal(m, n, base, | ||
(__SIZE_TYPE__)(stride)); | ||
} | ||
static __inline__ void __DEFAULT_FN_ATTRS_MOVRS | ||
__tile_loaddrs(__tile1024i *dst, const void *base, __SIZE_TYPE__ stride) { | ||
dst->tile = _tile_loaddrs_internal(dst->row, dst->col, base, stride); | ||
} | ||
static __inline__ void __DEFAULT_FN_ATTRS_MOVRS __tile_stream_loaddrs( | ||
__tile1024i *dst, const void *base, __SIZE_TYPE__ stride) { | ||
dst->tile = _tile_loaddrst1_internal(dst->row, dst->col, base, stride); | ||
} | ||
#undef __DEFAULT_FN_ATTRS_MOVRS | ||
#endif /* __x86_64__ */ | ||
#endif /* __AMXMOVRSINTRIN_H */ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.