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

RVV support qd8-f32-qc8w-gemm/igemm and qd8-f32-qc4w-gemm #7932

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ken-unger
Copy link
Contributor

Add RVV production support for qd8-f32-qc8w-gemm/igemm
Add RVV production support for qd8-f32-qc4w-gemm
Add RVV test cases for qs8-qc8w-gemm/igemm missing from previous PR.

@@ -277,254 +277,6 @@ std::vector<GemmTestParams> CreateTests1(
return gemm_tests;
}

#if XNN_ENABLE_RISCV_VECTOR && XNN_ARCH_RISCV
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need the separate test version here, just declare nr properly in the test case as below.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is generated code, the generator needs to be fixed instead.

BTW, this was missed in a previous review as well. I tried to fix it in #7888, but the newly generated tests are failing. Can you please take a look? You'll have to fix this in order to address this anyways.

@@ -3851,3 +3851,50 @@ INSTANTIATE_TEST_SUITE_P(
return info.param.test_name;
});

#if XNN_ARCH_RISCV && XNN_ENABLE_RISCV_VECTOR
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought I had committed this and below in a previous PR, but clearly not. Including now,

@@ -0,0 +1,116 @@
// Auto-generated file. Do not edit!
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Support for this was already included within src/qs8-igemm/rvv.c.in in a previous PR. No changes required.

@ken-unger
Copy link
Contributor Author

@dsharlet please review. Thank you.

  • Test cases all pass on bananapif3 (vlen=256)
  • I've chosen 4x4v for the production version for all as it wasn't clear if 7x4v (max) was actually better with bench_model.
  • We should probably delete 8x4v since that is a little misleading, with vector register thrashing and hence significantly lower performance. 7x4v is the real maximum.

@@ -277,254 +277,6 @@ std::vector<GemmTestParams> CreateTests1(
return gemm_tests;
}

#if XNN_ENABLE_RISCV_VECTOR && XNN_ARCH_RISCV
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is generated code, the generator needs to be fixed instead.

BTW, this was missed in a previous review as well. I tried to fix it in #7888, but the newly generated tests are failing. Can you please take a look? You'll have to fix this in order to address this anyways.

src/qd8-f32-qc8w-igemm/gen/qd8-f32-qc8w-igemm-3x4v-minmax-rvv.c
src/qd8-f32-qc8w-igemm/gen/qd8-f32-qc8w-igemm-5x4v-minmax-rvv.c
src/qd8-f32-qc8w-igemm/gen/qd8-f32-qc8w-igemm-6x4v-minmax-rvv.c
src/qd8-f32-qc8w-igemm/gen/qd8-f32-qc8w-igemm-7x4v-minmax-rvv.c
Copy link
Collaborator

Choose a reason for hiding this comment

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

.bzl file needs updating as well. This (and the .bzl files) are generated code, see file header for details (tools/update-microkernels.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants