Skip to content

Conversation

@wetliu
Copy link
Contributor

@wetliu wetliu commented Aug 15, 2017

It still cannot pass the test case for the fusion with bn and relu. The main problem is in the scheduler does not work with the scale_shift_nhwc function, which is added in the nn.mapping.

Any help is valuable to me. Thank you!

@tqchen
Copy link
Member

tqchen commented Aug 15, 2017

@Huyuwei do you mind help to do a review?


s[temp].compute_inline()
if DepthwiseConv2d.op in s.outputs:
Output = DepthwiseConv2d
Copy link
Member

Choose a reason for hiding this comment

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

You will need to cache_write here so this compute block is in local register

Output = DepthwiseConv2d
else:
Output = op.output(0)
#s[DepthwiseConv2d].set_scope("local")
Copy link
Member

Choose a reason for hiding this comment

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

set the scope of depthwise to be local

@Huyuwei
Copy link
Contributor

Huyuwei commented Aug 15, 2017

according to @tqchen's comment in #315:

the schedule interface should take Array of Tensors(or a single Tensor) instead of op. Also in terms of naming, map suffix is removed from functions and file names, and we assume all complex functions like conv is able to schedule with follwup ewise ops

Besides, it's better to add topi.testing.depthwise_conv2d

Could you refer to this PR #328 and do the same thing for depthwise_conv2d_nhwc @wetliu

@wetliu
Copy link
Contributor Author

wetliu commented Aug 15, 2017

I pulled the most recent TVM and try to build by make pylint. I got this error:
************* Module topi.nn.softmax
E: 22,15: Unexpected keyword argument 'axis' in function call (unexpected-keyword-arg)
E: 23, 8: No value for argument 'axis' in function call (no-value-for-parameter)

Any idea what I can do to fix it so that I can build by make pylint? Thank you.

@tqchen
Copy link
Member

tqchen commented Aug 15, 2017

This is the problem of upstream, it shall be fixed by #332

@wetliu
Copy link
Contributor Author

wetliu commented Aug 15, 2017

Can you please check what's happening as it cannot be built? @tqchen Is it the last version before you guys finish modifying the conv and depth conv? I don't want to modify the code again and again only because the upstream conv and deconv are still under developing. Thank you!

@tqchen
Copy link
Member

tqchen commented Aug 15, 2017

You will need to do a rebase on the upstream master, i think the conv will be freezed for a while from now on

@wetliu
Copy link
Contributor Author

wetliu commented Aug 15, 2017

OK. Thank you!

@wetliu
Copy link
Contributor Author

wetliu commented Aug 15, 2017

[solved]
I cannot bind the scheduler after merging the newest pr. It seems to me the tag is messed up if I add the name "depthwise_conv2d_nchw," etc. Where do I need to fix the tags?

Thank you!

auto kw = tvm::reduce_axis(tvm::Range{0, W->shape[1]}, "kw");
auto T = (pad_h == 0 && pad_w == 0)
? I
: pad(I, {tvm::Expr(0), tvm::Expr(0), pad_h, pad_w});
Copy link
Member

Choose a reason for hiding this comment

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

This should be {0, pad_h, pad_w, 0}

int stride_h = 1,
int stride_w = 1,
std::string name = "tensor",
std::string tag = kDepthwiseConv2d_nhwc) {
Copy link
Member

Choose a reason for hiding this comment

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

should be kDepthwiseConv2dNHWC

@tqchen
Copy link
Member

tqchen commented Aug 15, 2017

please fix the updated comment and do another pass over the code

@tqchen tqchen merged commit 989e99e into apache:master Aug 16, 2017
@tqchen tqchen changed the title [WIP] [TOPI] Depth wise Conv for NHWC [TOPI] Depth wise Conv for NHWC Aug 16, 2017
@tqchen
Copy link
Member

tqchen commented Aug 16, 2017

Thanks, this is merged

tqchen pushed a commit to tqchen/tvm that referenced this pull request May 26, 2018
…pache#325) (apache#326)

* Added elementwise-add test

* Fix typo

* Fixed elem-wise ops for lists with len>2
tqchen pushed a commit that referenced this pull request May 29, 2018
…325) (#326)

* Added elementwise-add test

* Fix typo

* Fixed elem-wise ops for lists with len>2
tqchen pushed a commit to tqchen/tvm that referenced this pull request Jul 6, 2018
…pache#325) (apache#326)

* Added elementwise-add test

* Fix typo

* Fixed elem-wise ops for lists with len>2
sergei-mironov pushed a commit to sergei-mironov/tvm that referenced this pull request Aug 8, 2018
…pache#325) (apache#326)

* Added elementwise-add test

* Fix typo

* Fixed elem-wise ops for lists with len>2
vinx13 pushed a commit to vinx13/tvm that referenced this pull request Mar 9, 2022
gigiblender pushed a commit to gigiblender/tvm that referenced this pull request Jan 19, 2023
This PR add hash/equal/json support for shape tuple.
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.

3 participants