Skip to content

Modify the Insert quant-dequant test cases to look for q-dq pattern#20672

Closed
nishantpdce wants to merge 2 commits intoexport-D15202187from
export-D15405606
Closed

Modify the Insert quant-dequant test cases to look for q-dq pattern#20672
nishantpdce wants to merge 2 commits intoexport-D15202187from
export-D15405606

Conversation

@nishantpdce
Copy link
Contributor

@nishantpdce nishantpdce commented May 18, 2019

Stack:
    :black_circle:  #20672 Modify the Insert quant-dequant test cases to look for q-dq pattern  💛
    :white_circle:  #20107 [pt1][quant] Add dequantize_linear for JIT pass  💚
    :white_circle:  #19984 [pt1][quant] Add qint8 type (int8_t)  💚

Current test case looks for q->int_repr->dq pattern and constant nodes also.
The prim::Constant nodes are not guaranteed to be present at same point in graph.
So we modify the test case to only look for the q->int_repr->dq nodes.

Test Cases:
./buck-out/gen/caffe2/test/jit#binary.par -r "test_insert_quantdequant_consecutive_qnodes_script"
test_insert_quantdequant_consecutive_qnodes_script (test_jit.TestJit) ... ok


Ran 1 test in 0.599s

OK
[npandit@devvm6468.prn2 /data/users/npandit/fbsource/fbcode] ./buck-out/gen/caffe2/test/jit#binary.par -r "test_insert_quantdequant_consecutive_qnodes_trace"
test_insert_quantdequant_consecutive_qnodes_trace (test_jit.TestJit) ... ok


Ran 1 test in 0.269s

OK
[npandit@devvm6468.prn2 /data/users/npandit/fbsource/fbcode] ./buck-out/gen/caffe2/test/jit#binary.par -r "test_insert_quantdequant_single_qnode"test_insert_quantdequant_single_qnode (test_jit.TestJit) ... ok


Ran 1 test in 0.678s

OK
[npandit@devvm6468.prn2 /data/users/npandit/fbsource/fbcode] ./buck-out/gen/caffe2/test/jit#binary.par -r "test_insert_quantdequant_alternate_qnode"
test_insert_quantdequant_alternate_qnode (test_jit.TestJit) ... ok


Ran 1 test in 0.688s

OK

Differential Revision: D15405606

Differential Revision: D15405606
Differential Version: 82212776
@pytorchbot pytorchbot added the oncall: jit Add this issue/PR to JIT oncall triage queue label May 18, 2019
@nishantpdce nishantpdce requested a review from ZolotukhinM May 18, 2019 01:15
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Looks good providing the tests pass (pls see one related comment inline).

Differential Revision: D15405606
Differential Version: 82213099
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 2af5911.

@ezyang ezyang deleted the export-D15405606 branch May 30, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: jit Add this issue/PR to JIT oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants