Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
d26bf882
"test/ut/vscode:/vscode.git/clone" did not exist on "b40e3db7eae576b59d5822a3a6a3e3fc57f58a23"
Commit
d26bf882
authored
Jul 08, 2022
by
Paul
Browse files
Add function signatures
parent
1c0b2a4a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
0 deletions
+68
-0
src/include/migraphx/partition.hpp
src/include/migraphx/partition.hpp
+42
-0
src/include/migraphx/pass_manager.hpp
src/include/migraphx/pass_manager.hpp
+1
-0
src/partition.cpp
src/partition.cpp
+20
-0
src/pass_manager.cpp
src/pass_manager.cpp
+5
-0
No files found.
src/include/migraphx/partition.hpp
0 → 100644
View file @
d26bf882
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2022 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MIGRAPHX_GUARD_MIGRAPHX_PARTITION_HPP
#define MIGRAPHX_GUARD_MIGRAPHX_PARTITION_HPP
#include <migraphx/config.hpp>
#include <migraphx/instruction_ref.hpp>
#include <string>
#include <unordered_map>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
program
;
void
partition
(
program
&
p
,
module
&
root
,
const
std
::
unordered_map
<
instruction_ref
,
std
::
string
>&
assignments
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/include/migraphx/pass_manager.hpp
View file @
d26bf882
...
@@ -47,6 +47,7 @@ struct module_pass_manager
...
@@ -47,6 +47,7 @@ struct module_pass_manager
void
run_passes
(
module
&
mod
,
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
=
tracer
{});
void
run_passes
(
module
&
mod
,
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
=
tracer
{});
void
run_passes
(
program
&
prog
,
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
=
tracer
{});
void
run_passes
(
program
&
prog
,
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
=
tracer
{});
void
run_passes
(
program
&
prog
,
module
&
root
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
=
tracer
{});
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/partition.cpp
0 → 100644
View file @
d26bf882
#include <migraphx/partition.hpp>
#include <migraphx/program.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
partition_op
{
std
::
string
label
;
std
::
string
name
()
const
{
return
"partition"
;
}
// TODO: Implement compute_shape and compute
};
void
partition
(
program
&
p
,
module
&
root
,
const
std
::
unordered_map
<
instruction_ref
,
std
::
string
>&
assignments
)
{
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
src/pass_manager.cpp
View file @
d26bf882
...
@@ -148,5 +148,10 @@ void run_passes(program& prog, const std::vector<pass>& passes, tracer trace)
...
@@ -148,5 +148,10 @@ void run_passes(program& prog, const std::vector<pass>& passes, tracer trace)
}
}
}
}
void
run_passes
(
program
&
prog
,
module
&
root
const
std
::
vector
<
pass
>&
passes
,
tracer
trace
)
{
// Run passes starting at root module instead of main module
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
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