-
Notifications
You must be signed in to change notification settings - Fork 25
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
AMX extension #68
base: master
Are you sure you want to change the base?
AMX extension #68
Conversation
} else if (item == "AMX") { | ||
cb.tdpbf16ps(Tmm(counter%6), tmm6, tmm7); | ||
counter++; | ||
} else { |
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.
Since this seems to be the only addition to the stock AVX512 payload can we integrate it there instead?
rc = syscall(SYS_arch_prctl, ARCH_REQ_XCOMP_PERM, XFEATURE_XTILEDATA); | ||
|
||
if(rc){ | ||
printf("XTILE_DATA request failed: %ld", rc); |
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.
please change to workerLog:: trace, error etc.
public: | ||
SapphireRapidsConfig(asmjit::CpuFeatures const &supportedFeatures, | ||
unsigned family, unsigned model, unsigned threads) | ||
: X86PlatformConfig("SKL_XEONEP", 6, {85}, {1, 2}, 0, |
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.
The first string should represent a short hand for Sapphire Rapids, this one is for Skylake.
Family and Model should be adjusted to 6 and 143 respectively. Search for CPUID on https://en.wikichip.org/wiki/intel/microarchitectures/sapphire_rapids
@@ -39,7 +39,7 @@ git_submodule_update() | |||
|
|||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") | |||
else() | |||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -O2 -fdata-sections -ffunction-sections") | |||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mamx-int8 -mamx-tile -Wall -Wextra -O2 -fdata-sections -ffunction-sections") |
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.
Are these necessary?
class AVX512_AMX_Payload final : public X86Payload { | ||
public: | ||
AVX512_AMX_Payload(asmjit::CpuFeatures const &supportedFeatures) | ||
: X86Payload(supportedFeatures, {asmjit::CpuFeatures::X86::kAMX_BF16}, |
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.
Checking for the kAMX_BF16 feature may have prevented you from integrating the AMX code it into the AVX512 payload. Can we check this feature if the "AMX" meta-instruction is selection during the compilePayload step instead?
SapphireRapidsConfig(asmjit::CpuFeatures const &supportedFeatures, | ||
unsigned family, unsigned model, unsigned threads) | ||
: X86PlatformConfig("SKL_XEONEP", 6, {85}, {1, 2}, 0, | ||
{32768, 1048576, 1441792}, 1048576000, 1536, family, |
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.
I assume these values also have not been updated
void create_AMX_config(__tilecfg *tileinfo); | ||
void request_permission(); | ||
void init_buffer_rand(uintptr_t buf1, uintptr_t buf2); | ||
|
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.
please define them as static functions inside the AVX512_AMX_Payload class or inside a new class handling the amx permissions and configs
No description provided.