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

Add unit-tests for dotCL function, N=1, M=1 case #2968

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dkjung
Copy link
Collaborator

@dkjung dkjung commented Feb 25, 2025


Add two unit-tests that test dotCL

As there is no test for dotCl function in the case with N=1, M=1,
I added two unit-tests for that condition.

Self evaluation:

  1. Build test: [*]Passed [ ]Failed [ ]Skipped
  2. Run test: [*]Passed [ ]Failed [ ]Skipped

How to evaluate:

  1. Run ./tools/android_test.sh with an Android device attached to your machine
  2.  adb shell /data/local/tmp/nntr_android_test/unittest_blas_kernels_cl --gtest_filter=blas_kernels.dotCL_sgemv_N_1_M_1_*

Add the two unit-test functions
- blas_kernels.dotCL_sgemv_N_1_M_1_1
- blas_kernels.dotCL_sgemv_N_1_M_1_2

They test the case such a case with `N=1, M=1`.

Signed-off-by: Daekyoung Jung <[email protected]>
@dkjung dkjung force-pushed the feature/opencl-unit-test branch from f61a3e4 to 434494e Compare February 25, 2025 13:55
Copy link
Member

@skykongkong8 skykongkong8 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@djeong20 djeong20 left a comment

Choose a reason for hiding this comment

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

Will there also be half-precision unit tests for N=1, M=1 case?

@@ -459,6 +459,97 @@ TEST(blas_kernels, dotCL_sgemv_n_fp16) {
EXPECT_THROW(dotCl(A_fp16, B_fp16, transA, transB), std::runtime_error);
}

TEST(blas_kernels, dotCL_sgemv_N_1_M_1_1) {
setUpGpuContext();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know if we need to call this for every test? I see most of the test cases do not, but only two test cases call it. (dotCL_sgemv_M_1_1, and dotCL_sgemv_M_1_1_fp16)

Copy link
Contributor

@baek2sm baek2sm left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

4 participants