Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _codeql_detected_source_root
5 changes: 4 additions & 1 deletion engine/minskyTensorOps.cc
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ namespace minsky
{
AccumArgs(): civita::ReduceArguments([](double& x,double y){x*=y;},1) {}
};
template <> struct AccumArgs<OperationType::divide>: public AccumArgs<OperationType::multiply> {};
template <> struct AccumArgs<OperationType::divide>: public civita::ReduceArguments
{
AccumArgs(): civita::ReduceArguments([](double& x,double y){x/=y;},1) {}

Choose a reason for hiding this comment

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

This change can't be correct. The accumulated arguments for a divide operation should be multiplication, not division. Also - the example provided in the ticket does not have multiple arguments attached to the port, so won't be affected by this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted the change. You're correct - the accumulated arguments for divide should use multiplication. The original code was correct for multi-wire accumulation.

Since the ticket example doesn't have multiple arguments on a port, the issue must be in the element-wise division logic elsewhere. Further investigation is needed to find the actual root cause.

Commit: 6848f0e

};

template <> struct AccumArgs<OperationType::min>: public civita::ReduceArguments
{
Expand Down
2 changes: 1 addition & 1 deletion exprtk

Choose a reason for hiding this comment

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

Please revert update to exprtk submodule. The current release of exprtk does not compile with our code.

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted the exprtk submodule update to the previous commit.

Commit: 6848f0e