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
3d08f40f
Commit
3d08f40f
authored
Jul 08, 2021
by
Shucai Xiao
Browse files
Merge branch 'develop' of github.com:ROCmSoftwarePlatform/AMDMIGraphX into scatter-op
parents
50cfbcda
6ba279cc
Changes
42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
tools/include/allocation_model.hpp
tools/include/allocation_model.hpp
+4
-1
tools/include/operation.hpp
tools/include/operation.hpp
+5
-3
No files found.
tools/include/allocation_model.hpp
View file @
3d08f40f
...
@@ -26,6 +26,8 @@ struct allocation_model
...
@@ -26,6 +26,8 @@ struct allocation_model
std
::
string
copy
()
const
;
std
::
string
copy
()
const
;
/// Create an allocation operator for the given shape
/// Create an allocation operator for the given shape
operation
allocate
(
const
shape
&
s
)
const
;
operation
allocate
(
const
shape
&
s
)
const
;
/// Create a preallocated operator for the given shape
operation
preallocate
(
const
shape
&
s
,
const
std
::
string
&
id
)
const
;
};
};
#else
#else
...
@@ -34,7 +36,8 @@ struct allocation_model
...
@@ -34,7 +36,8 @@ struct allocation_model
interface
(
'
allocation_model
'
,
interface
(
'
allocation_model
'
,
virtual
(
'
name
'
,
returns
=
'
std
::
string
'
,
const
=
True
),
virtual
(
'
name
'
,
returns
=
'
std
::
string
'
,
const
=
True
),
virtual
(
'
copy
'
,
returns
=
'
std
::
string
'
,
const
=
True
),
virtual
(
'
copy
'
,
returns
=
'
std
::
string
'
,
const
=
True
),
virtual
(
'
allocate
'
,
s
=
'
const
shape
&
'
,
returns
=
'
operation
'
,
const
=
True
)
virtual
(
'
allocate
'
,
s
=
'
const
shape
&
'
,
returns
=
'
operation
'
,
const
=
True
),
virtual
(
'
preallocate
'
,
s
=
'
const
shape
&
'
,
id
=
'
std
::
string
'
,
returns
=
'
operation
'
,
const
=
True
)
)
)
%>
%>
...
...
tools/include/operation.hpp
View file @
3d08f40f
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include <migraphx/module_ref.hpp>
#include <migraphx/module_ref.hpp>
#include <migraphx/serialize.hpp>
#include <migraphx/serialize.hpp>
#include <migraphx/auto_any_cast.hpp>
#include <migraphx/auto_any_cast.hpp>
#include <migraphx/lifetime.hpp>
#include <migraphx/config.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
namespace
migraphx
{
...
@@ -435,9 +436,9 @@ void from_value_op(T& x, const value& v)
...
@@ -435,9 +436,9 @@ void from_value_op(T& x, const value& v)
}
}
template
<
class
T
>
template
<
class
T
>
bool
is_borrowed
_op
(
const
T
&
)
lifetime
get_lifetime
_op
(
const
T
&
)
{
{
return
false
;
return
lifetime
::
local
;
}
}
}
// namespace detail
}
// namespace detail
...
@@ -453,7 +454,8 @@ bool is_borrowed_op(const T&)
...
@@ -453,7 +454,8 @@ bool is_borrowed_op(const T&)
const
=
True
,
const
=
True
,
default
=
'
detail
::
need_normalization_op
'
),
default
=
'
detail
::
need_normalization_op
'
),
virtual
(
'
has_finalize
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
detail
::
has_finalize_op
'
),
virtual
(
'
has_finalize
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
detail
::
has_finalize_op
'
),
virtual
(
'
is_borrowed
'
,
returns
=
'
bool
'
,
const
=
True
,
default
=
'
detail
::
is_borrowed_op
'
),
virtual
(
'
get_lifetime
'
,
returns
=
'
lifetime
'
,
const
=
True
,
default
=
'
detail
::
get_lifetime_op
'
),
virtual
(
'
output_alias
'
,
virtual
(
'
output_alias
'
,
returns
=
'
std
::
ptrdiff_t
'
,
returns
=
'
std
::
ptrdiff_t
'
,
input
=
'
const
std
::
vector
<
shape
>&
'
,
input
=
'
const
std
::
vector
<
shape
>&
'
,
...
...
Prev
1
2
3
Next
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