Skip to content

[6/10] Code generation for fully connected layer via CMSIS-NN#9456

Closed
asparkhi wants to merge 1 commit into
apache:mainfrom
asparkhi:fc
Closed

[6/10] Code generation for fully connected layer via CMSIS-NN#9456
asparkhi wants to merge 1 commit into
apache:mainfrom
asparkhi:fc

Conversation

@asparkhi

@asparkhi asparkhi commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Support for fully connected layer via CMSIS-NN.

Here is the tracking issue: #8646

@asparkhi

asparkhi commented Nov 5, 2021

Copy link
Copy Markdown
Contributor Author

cc: @Mousius @manupa-arm @leandron @areusch for code reviews.

Change-Id: I67f65e69dfa2c6d31c2ea928d92a827df80bc51a

@manupak manupak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Broadly looks good! Few stylistic comments!

Comment thread src/relay/backend/contrib/cmsisnn/relay_to_tir.cc
Comment thread src/relay/backend/contrib/cmsisnn/relay_to_tir.cc
scalar_args = tvm::runtime::Concat(scalar_args, cmsisnn_filter_shape);
scalar_args = tvm::runtime::Concat(scalar_args, bias_shape);
scalar_args = tvm::runtime::Concat(scalar_args, cmsisnn_output_shape);
call_ext_args = tvm::runtime::Concat(call_ext_args, scalar_args);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit : Would it be possible to keep the definitions of sub-catergories that get concatenated closer to here ? So it is easy to follow ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't get this. Which ones should be close together and are not?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

e.g.

Array<PrimExpr> cmsisnn_input_shape{input_shape[0], 1, 1, input_shape[1]};
scalar_args = tvm::runtime::Concat(scalar_args, cmsisnn_input_shape);

Array<PrimExpr> cmsisnn_filter_shape{in_channels, 1, 1, out_channels};
scalar_args = tvm::runtime::Concat(scalar_args, cmsisnn_filter_shape);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean

@asparkhi asparkhi Dec 2, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Can't do because of a cross dependency in this case 😕

@asparkhi asparkhi closed this Dec 2, 2021
@asparkhi asparkhi deleted the fc branch December 7, 2021 10:06
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.

2 participants