Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Fix bug in Express::AlwaysZero() (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringgaard authored Jul 9, 2019
1 parent 2a7f451 commit 5b9226c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/guide/myelin.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ cell f { // size 2336

Finally, the Myelin JIT compiler converts the optimized operations into
[assembler code](flowasm.txt) using the selected kernel generators. The code
generated for each function depends the negotiated layout and alignment of the
input and output tensors as well as the features support by the CPU (SSE, AVX,
AVX2, FMA3, AVX512, etc.).
generated for each function depends on the negotiated layout and alignment of
the input and output tensors as well as the features support by the CPU (SSE,
AVX, AVX2, FMA3, AVX512, etc.).

### Computing using network cell instances

Expand Down
1 change: 1 addition & 0 deletions sling/myelin/express.cc
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,7 @@ bool Express::AlwaysZero(Var *x) const {
case MOV:
return AlwaysZero(op->args[0]);
case ADD:
return AlwaysZero(op->args[0]) && AlwaysZero(op->args[1]);
case SUB:
return (AlwaysZero(op->args[0]) && AlwaysZero(op->args[1])) ||
(AlwaysOne(op->args[0]) && AlwaysOne(op->args[1]));
Expand Down

0 comments on commit 5b9226c

Please sign in to comment.