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

Fix padding in pooling op #4738

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Fix padding in pooling op #4738

merged 1 commit into from
Jan 22, 2020

Conversation

apivovarov
Copy link
Contributor

@apivovarov apivovarov commented Jan 18, 2020

Currently we have a bug in pooling op. The code calculates D, H and W padding but uses only D padding. H and W paddings are ignored.
More on the issue: https://discuss.tvm.ai/t/runtime-failed-for-5d-input/5429

This CR fixes it.

@apivovarov
Copy link
Contributor Author

apivovarov commented Jan 18, 2020

@optima2005 @masahi @anijain2305 @alexgl-github @kevinthesun Can you have a look?

@vinx13
Copy link
Member

vinx13 commented Jan 18, 2020

please add a test case

@vinx13 vinx13 added status: need review status: need test case need test cases to cover the change labels Jan 18, 2020
@apivovarov
Copy link
Contributor Author

How to test correctness of oshape calculation in src/relay/op/nn/pooling.cc? What test file is responsible for that? I tried to check output shape in topi/tests/python/test_topi_pooling.py but looks like it is not using formula defined in pooling.cc.

@vinx13
Copy link
Member

vinx13 commented Jan 18, 2020

It's in tests/python/relay/test_op_level2.py, you can check the result of infer_type in the test case

@masahi
Copy link
Member

masahi commented Jan 19, 2020

you can just a test case where pooling has different pad size in each dimension.

@apivovarov apivovarov force-pushed the fix_pooling3d branch 4 times, most recently from 37308c4 to 534b60e Compare January 21, 2020 21:11
@apivovarov
Copy link
Contributor Author

The test case was added. @vinx13, @anijain2305 can you have a look again?

@vinx13 vinx13 merged commit 4dbe4d9 into apache:master Jan 22, 2020
@vinx13 vinx13 added status: accepted and removed status: need review status: need test case need test cases to cover the change labels Jan 22, 2020
@vinx13
Copy link
Member

vinx13 commented Jan 22, 2020

Thanks @apivovarov @masahi this is merged

alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 26, 2020
alexwong pushed a commit to alexwong/tvm that referenced this pull request Feb 28, 2020
zhiics pushed a commit to neo-ai/tvm that referenced this pull request Mar 2, 2020
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.

3 participants