Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
4f7d8fa9
Commit
4f7d8fa9
authored
Nov 22, 2019
by
Ashok Emani
Committed by
Scott Cyphers
Nov 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move CollpaseDims pass into core (#3869)
* move CollpaseDims pass into core * style apply * skip plaidml tests
parent
5f8d7005
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
18 deletions
+16
-18
CMakeLists.txt
src/ngraph/CMakeLists.txt
+2
-0
collapse_dims.cpp
src/ngraph/pass/collapse_dims.cpp
+2
-2
collapse_dims.hpp
src/ngraph/pass/collapse_dims.hpp
+5
-11
pass_config.cpp
src/ngraph/pass/pass_config.cpp
+2
-2
CMakeLists.txt
src/ngraph/runtime/cpu/CMakeLists.txt
+0
-1
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+2
-2
unit_test.manifest
src/ngraph/runtime/plaidml/unit_test.manifest
+3
-0
No files found.
src/ngraph/CMakeLists.txt
View file @
4f7d8fa9
...
...
@@ -391,6 +391,8 @@ set (SRC
pass/implicit_broadcast_elimination.cpp
pass/batch_fusion.hpp
pass/batch_fusion.cpp
pass/collapse_dims.cpp
pass/collapse_dims.hpp
pass/common_function_collection.cpp
pass/common_function_collection.hpp
pass/constant_folding.cpp
...
...
src/ngraph/
runtime/cpu/pass/cpu_
collapse_dims.cpp
→
src/ngraph/
pass/
collapse_dims.cpp
View file @
4f7d8fa9
...
...
@@ -14,7 +14,7 @@
// limitations under the License.
//*****************************************************************************
#include "c
pu_c
ollapse_dims.hpp"
#include "collapse_dims.hpp"
#include <algorithm>
#include <iostream>
#include <numeric>
...
...
@@ -239,7 +239,7 @@ static bool collapse_dot(std::shared_ptr<Node> n)
return
replaced
;
}
bool
runtime
::
cpu
::
pass
::
CPU
CollapseDims
::
run_on_function
(
std
::
shared_ptr
<
ngraph
::
Function
>
f
)
bool
ngraph
::
pass
::
CollapseDims
::
run_on_function
(
std
::
shared_ptr
<
ngraph
::
Function
>
f
)
{
bool
replaced
=
false
;
for
(
auto
n
:
f
->
get_ordered_ops
())
...
...
src/ngraph/
runtime/cpu/pass/cpu_
collapse_dims.hpp
→
src/ngraph/
pass/
collapse_dims.hpp
View file @
4f7d8fa9
...
...
@@ -20,18 +20,12 @@
namespace
ngraph
{
namespace
runtime
namespace
pass
{
namespace
cpu
class
CollapseDims
:
public
ngraph
::
pass
::
FunctionPass
{
namespace
pass
{
class
CPUCollapseDims
:
public
ngraph
::
pass
::
FunctionPass
{
public
:
bool
run_on_function
(
std
::
shared_ptr
<
ngraph
::
Function
>
function
)
override
;
};
}
}
public
:
bool
run_on_function
(
std
::
shared_ptr
<
ngraph
::
Function
>
function
)
override
;
};
}
}
src/ngraph/pass/pass_config.cpp
View file @
4f7d8fa9
...
...
@@ -29,8 +29,8 @@ pass::PassConfig::PassConfig()
// Parses the semi-colon separated environment string passed through NGRAPH_PASS_ENABLES
// and returns the pass names and whether they should be enabled or disabled in the
// provided unordered_map. Implementation of pass selection is up to the backend
// E.g., NGRAPH_PASS_ENABLES="CoreFusion:0;LikeReplacement:1;C
PUC
ollapseDims" would
// set disables on CoreFusion and enables on LikeReplacement and C
PUC
ollapseDims
// E.g., NGRAPH_PASS_ENABLES="CoreFusion:0;LikeReplacement:1;CollapseDims" would
// set disables on CoreFusion and enables on LikeReplacement and CollapseDims
//
const
char
*
env_str
=
getenv
(
"NGRAPH_PASS_ENABLES"
);
if
(
env_str
)
...
...
src/ngraph/runtime/cpu/CMakeLists.txt
View file @
4f7d8fa9
...
...
@@ -120,7 +120,6 @@ set(SRC
op/sigmoid_mul.cpp
op/update_slice.cpp
pass/cpu_assignment.cpp
pass/cpu_collapse_dims.cpp
pass/cpu_fusion.cpp
pass/cpu_horizontal_fusion.cpp
pass/cpu_layout.cpp
...
...
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
4f7d8fa9
...
...
@@ -140,6 +140,7 @@
#include "ngraph/op/xor.hpp"
#include "ngraph/pass/algebraic_simplification.hpp"
#include "ngraph/pass/batch_fusion.hpp"
#include "ngraph/pass/collapse_dims.hpp"
#include "ngraph/pass/common_function_collection.hpp"
#include "ngraph/pass/constant_folding.hpp"
#include "ngraph/pass/core_fusion.hpp"
...
...
@@ -190,7 +191,6 @@
#include "ngraph/runtime/cpu/op/sigmoid_mul.hpp"
#include "ngraph/runtime/cpu/op/update_slice.hpp"
#include "ngraph/runtime/cpu/pass/cpu_assignment.hpp"
#include "ngraph/runtime/cpu/pass/cpu_collapse_dims.hpp"
#include "ngraph/runtime/cpu/pass/cpu_fusion.hpp"
#include "ngraph/runtime/cpu/pass/cpu_horizontal_fusion.hpp"
#include "ngraph/runtime/cpu/pass/cpu_layout.hpp"
...
...
@@ -1224,7 +1224,7 @@ void runtime::cpu::CPU_ExternalFunction::register_common_passes(
}
REGISTER_KNOBBED_PASS
(
CPUQuantFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
CPUHorizontalFusion
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
C
PUCollapseDims
,
true
,
runtime
::
cpu
::
pass
)
REGISTER_KNOBBED_PASS
(
C
ollapseDims
,
true
,
ngraph
::
pass
)
#if defined(NGRAPH_HALIDE)
REGISTER_KNOBBED_PASS
(
HalideSubgraphExtraction
,
true
,
ngraph
::
runtime
::
cpu
::
pass
)
#endif
...
...
src/ngraph/runtime/plaidml/unit_test.manifest
View file @
4f7d8fa9
...
...
@@ -250,6 +250,9 @@ model_argmax_int32
model_argmin_int32
model_lp_norm_default
model_instance_normalization
model_qlinear_matmul_3d
model_matmul_integer_4d
model_matmul_integer_4d_zero_point
# failings on plaidml_nGPU
argmin_4D_i64
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment