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

@asparkhiasparkhi commented Nov 5, 2021

Copy link
Copy Markdown
Contributor

Support for fully connected layer via CMSIS-NN.

Here is the tracking issue: #8646

@asparkhi

Copy link
Copy Markdown
ContributorAuthor

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

Change-Id: I67f65e69dfa2c6d31c2ea928d92a827df80bc51a

@manupakmanupak 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 threadsrc/relay/backend/contrib/cmsisnn/relay_to_tir.cc
Comment threadsrc/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
ContributorAuthor

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
ContributorAuthor

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

@asparkhiasparkhiDec 2, 2021

Copy link
Copy Markdown
ContributorAuthor

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 😕

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

@asparkhi@manupak