From 67bdb92ac41971765f20784e8a64f797767bab41 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 04:13:45 +0000 Subject: [PATCH 1/6] Initial plan From 3b9a0a51bef837afecf9f1061e78547c3fb3c991 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 04:19:33 +0000 Subject: [PATCH 2/6] Initial analysis of ticket #1886 Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com> --- exprtk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exprtk b/exprtk index 34b579433..cc1b800c2 160000 --- a/exprtk +++ b/exprtk @@ -1 +1 @@ -Subproject commit 34b57943392fa24d182ce4b87624df555cf285be +Subproject commit cc1b800c2bd1ac3ac260478c915d2aec6f4eb41c From 36f54bfbb9360ba772e82a7e110983eb030a665f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 04:24:36 +0000 Subject: [PATCH 3/6] Fix divide operation AccumArgs to use division instead of multiplication Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com> --- engine/minskyTensorOps.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/minskyTensorOps.cc b/engine/minskyTensorOps.cc index b68c75a9c..c1f635c83 100644 --- a/engine/minskyTensorOps.cc +++ b/engine/minskyTensorOps.cc @@ -253,7 +253,10 @@ namespace minsky { AccumArgs(): civita::ReduceArguments([](double& x,double y){x*=y;},1) {} }; - template <> struct AccumArgs: public AccumArgs {}; + template <> struct AccumArgs: public civita::ReduceArguments + { + AccumArgs(): civita::ReduceArguments([](double& x,double y){x/=y;},1) {} + }; template <> struct AccumArgs: public civita::ReduceArguments { From b34d164c1542ceefb7ceabb116748e0ec1309c0b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 04:28:16 +0000 Subject: [PATCH 4/6] Final summary - ready for merge Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 000000000..945c9b46d --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file From b3e8e6e98d06e69b50c9c8ae91cac5c38e9e84ac Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 04:47:00 +0000 Subject: [PATCH 5/6] Update divide operation test to match new accumulation semantics Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com> --- test/testTensorOps.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testTensorOps.cc b/test/testTensorOps.cc index daa02e614..55bee586c 100644 --- a/test/testTensorOps.cc +++ b/test/testTensorOps.cc @@ -995,7 +995,7 @@ TEST_F(MinskyTensorOpSuite, tensorBinOpMultiples) (0, [](double x,double y){return x+y;}, [](double x){return -x;}); multiWireTest(1, [](double x,double y){return x*y;}, id); multiWireTest - (1, [](double x,double y){return x*y;}, [](double x){return 1/x;}); + (1, [](double x,double y){return 1.0/x/y;}, [](double x){return 1/x;}); multiWireTest (std::numeric_limits::max(), [](double x,double y){return x From 6848f0e9c4432f4279270b88f9baa94f9704e4dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 29 Oct 2025 05:27:26 +0000 Subject: [PATCH 6/6] Revert incorrect divide accumulation fix and exprtk update Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com> --- engine/minskyTensorOps.cc | 5 +---- exprtk | 2 +- test/testTensorOps.cc | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/engine/minskyTensorOps.cc b/engine/minskyTensorOps.cc index c1f635c83..b68c75a9c 100644 --- a/engine/minskyTensorOps.cc +++ b/engine/minskyTensorOps.cc @@ -253,10 +253,7 @@ namespace minsky { AccumArgs(): civita::ReduceArguments([](double& x,double y){x*=y;},1) {} }; - template <> struct AccumArgs: public civita::ReduceArguments - { - AccumArgs(): civita::ReduceArguments([](double& x,double y){x/=y;},1) {} - }; + template <> struct AccumArgs: public AccumArgs {}; template <> struct AccumArgs: public civita::ReduceArguments { diff --git a/exprtk b/exprtk index cc1b800c2..34b579433 160000 --- a/exprtk +++ b/exprtk @@ -1 +1 @@ -Subproject commit cc1b800c2bd1ac3ac260478c915d2aec6f4eb41c +Subproject commit 34b57943392fa24d182ce4b87624df555cf285be diff --git a/test/testTensorOps.cc b/test/testTensorOps.cc index 55bee586c..daa02e614 100644 --- a/test/testTensorOps.cc +++ b/test/testTensorOps.cc @@ -995,7 +995,7 @@ TEST_F(MinskyTensorOpSuite, tensorBinOpMultiples) (0, [](double x,double y){return x+y;}, [](double x){return -x;}); multiWireTest(1, [](double x,double y){return x*y;}, id); multiWireTest - (1, [](double x,double y){return 1.0/x/y;}, [](double x){return 1/x;}); + (1, [](double x,double y){return x*y;}, [](double x){return 1/x;}); multiWireTest (std::numeric_limits::max(), [](double x,double y){return x