ONEforALL-S003 / ONE

On-device Neural Engine / q-implant
Other
1 stars 2 forks source link

[q-implant] Unit tests for q-implant #12

Open Judgement9882 opened 1 year ago

Judgement9882 commented 1 year ago

for 11254 draft 11530 (이건 # 달면 Samsung ONE 에도 생겨서 지금은 # 뺐습니다)

What

Let's develop the q-implant-test, unit tests of the q-implant module.

Why

Progress

  1. compiler/q-implant/CMakeLists.txt

    • Add add_subdirectory(tests)
  2. compiler/q-implant/requires.cmake

    • We're going to use common-artifacts. So, add common-artifacts
  3. compiler/q-implant/tests/test.lst

    • Add recipe to proceed q-implant with addval command
  4. compiler/q-implant/tests/CMakeLists.txt

    • Add q_implant_test
  5. compiler/q-implant/tests/q-implant.sh

    • Define unit tests sequence
  6. compiler/q-implant/tests/test_utils.py

    • Write the code to extract qparams. (qparams consists of qparam.json and .npy files)
  7. compiler/q-implant/tests/q_implant_test.py

    • Import test_utils.py to extract qparams
    • Proceed to q_implant
    • If there is a problem in progress, fail the test with the quit(255).
    • If it works well, pass the test with the quit(0).


We will write the above process to "draft PR" soon.

Result

Question

  1. If we proceed with the method introduced above, q-implant-test will be added to the nncc test, can we do that?
  2. We are thinking of tests that check if qparams are generated correctly and output.circle is generated correctly. Are there any additional tests to consider?
FantBlog commented 1 year ago

LGTM