-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add a check for packed tensors for convolution solvers #2471
Changes from 7 commits
dfee26c
c3166b9
331b19d
fa00081
a0dcdec
b9734ca
82cf6d7
494b325
d702070
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,9 @@ bool ConvAsm7x7c3h224w224k64u2v2p3q3f1::IsApplicable(const ExecutionContext& ctx | |
if(!ctx.rmv.IsV2orV3()) | ||
return false; | ||
|
||
if(problem.HasNonPackedTensors()) | ||
return false; | ||
|
||
if(problem.IsTensorsCasted()) | ||
return false; | ||
|
||
|
@@ -65,17 +68,11 @@ bool ConvAsm7x7c3h224w224k64u2v2p3q3f1::IsApplicable(const ExecutionContext& ctx | |
#endif | ||
if(!(name == "gfx800" || name == "gfx802" || name == "gfx803" || name == "gfx804" || | ||
name == "gfx900" || name == "gfx904" || name == "gfx906" || name == "gfx908")) | ||
{ | ||
return false; | ||
} | ||
Comment on lines
69
to
-70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Curly braces are needed here. There was some misunderstanding here, I meant that curly braces are not required where the condition is short enough and the returned statement occupies one line. My comment related primarily to the new code. I should have explained this in more detail. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, this is quite arbitrary and I find it hard to agree with. The language allows two choices: (1) no braces when the conditional has a single statement in the body and that has nothing to do with the length of the condition. That can be a source of bugs in absence of formatting, so I use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it must be formalized and forced by clang-format. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll see if I can set up a clang format for this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm of the opinion that we should always use On the general topic of style, I've opened up #2482 for discussion on adopting Google Style Guide. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
NO. If there is no enforcing tool, then code review comes into play. That's one of the purposes of code reviews. The reviewers are spending time, and good authors value this and learn from the reviews. And professional engineers are able to adapt his/her own tastes to whatever practices used in the communities (they joined). @amberhassaan There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @atamazov NO for you NO) clang-format can handle curly braced case in one way or another. Probably it handles it not ideally, but in uniform and automated way, which simplify everything. So, it must be used, moreover, if the ideal rules can't be formalized and each reviewer may have his own flavor of ideal solution. Just to mention, I'm talking about the case which can be handled by clang-format. And as I've already said - we want to argue about the codestyle, it happens over and over again. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @atamazov : no, it's not fine that we are discussing style issues that would've been easily handled if we had a style document. We are creating unnecessary back and forth for minor matters. We need to have a |
||
if(!problem.direction.IsForward()) | ||
{ | ||
return false; | ||
} | ||
if(!problem.IsLayoutDefault()) | ||
{ | ||
return false; | ||
} | ||
|
||
// clang-format off | ||
return problem.GetPadW() == 3 // -q | ||
|
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@atamazov : favoring the current name as it is more descriptive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[resolved]