Skip to content
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

[Feature] Enable AMX FP16 on next generation CPU #456

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

wenhuanh
Copy link
Contributor

need export env DNNL_MAX_CPU_ISA=AVX512_CORE_AMX_FP16 when running

TimeLine t("onednn_amx_sgemm_f32bf16f32_compute");
TimeLine t1("onednn_amx_sgemm_f32bf16f32_compute.create_primitive");
template <typename Tin, typename Tweight, typename Tout>
void onednn_amx_sgemm_f32x16f32_compute(bool transA, int M, int N, int K, float alpha, const Tin *A, int lda,
Copy link
Contributor

Choose a reason for hiding this comment

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

reanme onednn_amx_gemm_compute?

void onednn_amx_sgemm_f32bf16f32_compute_residential(bool transA, int M, int N, int K, float alpha, const Tin *A,
int lda, const bfloat16_t *packedB, float beta, Tout *C, int ldc, const float *bias, const Tin *res,
template <typename Tin, typename Tweight, typename Tout>
void onednn_amx_sgemm_f32x16f32_compute_residential(bool transA, int M, int N, int K, float alpha, const Tin *A,
Copy link
Contributor

Choose a reason for hiding this comment

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

reanme onednn_amx_gemm_compute_residential?

@changqi1
Copy link
Contributor

除了compute和compute_resident,其他的kernel也需要支持这个amx fp16的支持

@wenhuanh
Copy link
Contributor Author

revised and updated.

@changqi1
Copy link
Contributor

changqi1 commented Jun 20, 2024

@wenhuanh We will need to check ISA to select AMX_FP16 or AVX512_FP16. But currently this is OK.
And you need to give its perf improvement in GNR vs. EMR.

 need export env DNNL_MAX_CPU_ISA=AVX512_CORE_AMX_FP16 when running

Signed-off-by: Wenhuan Huang <wenhuan.huang@intel.com>
@changqi1 changqi1 added the enhancement New feature or request label Jun 21, 2024
@wenhuanh
Copy link
Contributor Author

Perf status was updated in related JIRA.

@changqi1 changqi1 merged commit 0ce383b into intel:main Jun 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants