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
94e3a2e4
Commit
94e3a2e4
authored
Feb 12, 2022
by
Shucai Xiao
Browse files
change size_t to int
parent
26bd92d8
Changes
256
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
38 additions
and
38 deletions
+38
-38
src/include/migraphx/argument.hpp
src/include/migraphx/argument.hpp
+1
-1
src/include/migraphx/array.hpp
src/include/migraphx/array.hpp
+5
-5
src/include/migraphx/compile_src.hpp
src/include/migraphx/compile_src.hpp
+1
-1
src/include/migraphx/dynamic_loader.hpp
src/include/migraphx/dynamic_loader.hpp
+1
-1
src/include/migraphx/eliminate_allocation.hpp
src/include/migraphx/eliminate_allocation.hpp
+1
-1
src/include/migraphx/env.hpp
src/include/migraphx/env.hpp
+3
-3
src/include/migraphx/file_buffer.hpp
src/include/migraphx/file_buffer.hpp
+1
-1
src/include/migraphx/functional.hpp
src/include/migraphx/functional.hpp
+9
-9
src/include/migraphx/gemm.hpp
src/include/migraphx/gemm.hpp
+3
-3
src/include/migraphx/instruction_ref.hpp
src/include/migraphx/instruction_ref.hpp
+1
-1
src/include/migraphx/json.hpp
src/include/migraphx/json.hpp
+1
-1
src/include/migraphx/load_save.hpp
src/include/migraphx/load_save.hpp
+1
-1
src/include/migraphx/make_shared_array.hpp
src/include/migraphx/make_shared_array.hpp
+1
-1
src/include/migraphx/module.hpp
src/include/migraphx/module.hpp
+1
-1
src/include/migraphx/msgpack.hpp
src/include/migraphx/msgpack.hpp
+1
-1
src/include/migraphx/op/capture.hpp
src/include/migraphx/op/capture.hpp
+2
-2
src/include/migraphx/op/dot.hpp
src/include/migraphx/op/dot.hpp
+2
-2
src/include/migraphx/op/gather.hpp
src/include/migraphx/op/gather.hpp
+1
-1
src/include/migraphx/op/get_tuple_elem.hpp
src/include/migraphx/op/get_tuple_elem.hpp
+1
-1
src/include/migraphx/op/loop.hpp
src/include/migraphx/op/loop.hpp
+1
-1
No files found.
src/include/migraphx/argument.hpp
View file @
94e3a2e4
...
@@ -68,7 +68,7 @@ struct argument : raw_data<argument>
...
@@ -68,7 +68,7 @@ struct argument : raw_data<argument>
std
::
vector
<
argument
>
get_sub_objects
()
const
;
std
::
vector
<
argument
>
get_sub_objects
()
const
;
/// Return the ith element
/// Return the ith element
argument
element
(
std
::
size_
t
i
)
const
;
argument
element
(
in
t
i
)
const
;
private:
private:
void
assign_buffer
(
std
::
function
<
char
*
()
>
d
);
void
assign_buffer
(
std
::
function
<
char
*
()
>
d
);
...
...
src/include/migraphx/array.hpp
View file @
94e3a2e4
...
@@ -25,7 +25,7 @@ struct array_type<void, Ts...> : std::common_type<Ts...>
...
@@ -25,7 +25,7 @@ struct array_type<void, Ts...> : std::common_type<Ts...>
template
<
class
R
,
class
...
Ts
>
template
<
class
R
,
class
...
Ts
>
using
array_type_t
=
typename
array_type
<
R
,
Ts
...
>::
type
;
using
array_type_t
=
typename
array_type
<
R
,
Ts
...
>::
type
;
template
<
class
T
,
std
::
size_t
N
,
std
::
size_
t
...
I
>
template
<
class
T
,
int
N
,
in
t
...
I
>
constexpr
std
::
array
<
std
::
remove_cv_t
<
T
>
,
N
>
to_array_impl
(
T
(
&
a
)[
N
],
seq
<
I
...
>
)
constexpr
std
::
array
<
std
::
remove_cv_t
<
T
>
,
N
>
to_array_impl
(
T
(
&
a
)[
N
],
seq
<
I
...
>
)
{
{
return
{{
a
[
I
]...}};
return
{{
a
[
I
]...}};
...
@@ -41,7 +41,7 @@ constexpr std::array<detail::array_type_t<Result, Ts...>, sizeof...(Ts)> make_ar
...
@@ -41,7 +41,7 @@ constexpr std::array<detail::array_type_t<Result, Ts...>, sizeof...(Ts)> make_ar
constexpr
std
::
array
<
int
,
0
>
make_array
()
{
return
{};
}
constexpr
std
::
array
<
int
,
0
>
make_array
()
{
return
{};
}
template
<
class
T
,
std
::
size_
t
N
>
template
<
class
T
,
in
t
N
>
constexpr
auto
to_array
(
T
(
&
a
)[
N
])
constexpr
auto
to_array
(
T
(
&
a
)[
N
])
{
{
return
detail
::
to_array_impl
(
a
,
detail
::
gens
<
N
>
{});
return
detail
::
to_array_impl
(
a
,
detail
::
gens
<
N
>
{});
...
@@ -49,7 +49,7 @@ constexpr auto to_array(T (&a)[N])
...
@@ -49,7 +49,7 @@ constexpr auto to_array(T (&a)[N])
namespace
detail
{
namespace
detail
{
template
<
std
::
size_
t
Offset
=
0
,
class
Array
,
std
::
size_
t
...
I
>
template
<
in
t
Offset
=
0
,
class
Array
,
in
t
...
I
>
constexpr
auto
rearray_impl
(
Array
a
,
seq
<
I
...
>
)
constexpr
auto
rearray_impl
(
Array
a
,
seq
<
I
...
>
)
{
{
return
make_array
(
a
[
I
+
Offset
]...);
return
make_array
(
a
[
I
+
Offset
]...);
...
@@ -57,13 +57,13 @@ constexpr auto rearray_impl(Array a, seq<I...>)
...
@@ -57,13 +57,13 @@ constexpr auto rearray_impl(Array a, seq<I...>)
}
// namespace detail
}
// namespace detail
template
<
class
T
,
std
::
size_
t
N
>
template
<
class
T
,
in
t
N
>
constexpr
auto
pop_front
(
std
::
array
<
T
,
N
>
a
)
constexpr
auto
pop_front
(
std
::
array
<
T
,
N
>
a
)
{
{
return
detail
::
rearray_impl
(
a
,
detail
::
gens
<
N
-
1
>
{});
return
detail
::
rearray_impl
(
a
,
detail
::
gens
<
N
-
1
>
{});
}
}
template
<
class
T
,
std
::
size_
t
N
>
template
<
class
T
,
in
t
N
>
constexpr
auto
pop_back
(
std
::
array
<
T
,
N
>
a
)
constexpr
auto
pop_back
(
std
::
array
<
T
,
N
>
a
)
{
{
return
detail
::
rearray_impl
<
1
>
(
a
,
detail
::
gens
<
N
-
1
>
{});
return
detail
::
rearray_impl
<
1
>
(
a
,
detail
::
gens
<
N
-
1
>
{});
...
...
src/include/migraphx/compile_src.hpp
View file @
94e3a2e4
...
@@ -15,7 +15,7 @@ struct src_file
...
@@ -15,7 +15,7 @@ struct src_file
{
{
fs
::
path
path
;
fs
::
path
path
;
std
::
pair
<
const
char
*
,
const
char
*>
content
;
std
::
pair
<
const
char
*
,
const
char
*>
content
;
std
::
size_
t
len
()
const
{
return
content
.
second
-
content
.
first
;
}
in
t
len
()
const
{
return
content
.
second
-
content
.
first
;
}
};
};
struct
src_compiler
struct
src_compiler
...
...
src/include/migraphx/dynamic_loader.hpp
View file @
94e3a2e4
...
@@ -18,7 +18,7 @@ struct dynamic_loader
...
@@ -18,7 +18,7 @@ struct dynamic_loader
dynamic_loader
(
const
fs
::
path
&
p
);
dynamic_loader
(
const
fs
::
path
&
p
);
dynamic_loader
(
const
char
*
image
,
std
::
size_
t
size
);
dynamic_loader
(
const
char
*
image
,
in
t
size
);
dynamic_loader
(
const
std
::
vector
<
char
>&
buffer
);
dynamic_loader
(
const
std
::
vector
<
char
>&
buffer
);
...
...
src/include/migraphx/eliminate_allocation.hpp
View file @
94e3a2e4
...
@@ -17,7 +17,7 @@ struct module;
...
@@ -17,7 +17,7 @@ struct module;
struct
eliminate_allocation
struct
eliminate_allocation
{
{
std
::
string
allocation_op
{};
std
::
string
allocation_op
{};
std
::
size_
t
alignment
=
32
;
in
t
alignment
=
32
;
std
::
string
name
()
const
{
return
"eliminate_allocation"
;
}
std
::
string
name
()
const
{
return
"eliminate_allocation"
;
}
void
apply
(
module
&
p
)
const
;
void
apply
(
module
&
p
)
const
;
};
};
...
...
src/include/migraphx/env.hpp
View file @
94e3a2e4
...
@@ -19,7 +19,7 @@ bool enabled(const char* name);
...
@@ -19,7 +19,7 @@ bool enabled(const char* name);
bool
disabled
(
const
char
*
name
);
bool
disabled
(
const
char
*
name
);
std
::
vector
<
std
::
string
>
env
(
const
char
*
name
);
std
::
vector
<
std
::
string
>
env
(
const
char
*
name
);
std
::
size_
t
value_of
(
const
char
*
name
,
std
::
size_
t
fallback
=
0
);
in
t
value_of
(
const
char
*
name
,
in
t
fallback
=
0
);
std
::
string
string_value_of
(
const
char
*
name
,
std
::
string
fallback
=
""
);
std
::
string
string_value_of
(
const
char
*
name
,
std
::
string
fallback
=
""
);
...
@@ -38,9 +38,9 @@ bool disabled(T)
...
@@ -38,9 +38,9 @@ bool disabled(T)
}
}
template
<
class
T
>
template
<
class
T
>
std
::
size_
t
value_of
(
T
,
std
::
size_
t
fallback
=
0
)
in
t
value_of
(
T
,
in
t
fallback
=
0
)
{
{
static
const
std
::
size_
t
result
=
value_of
(
T
::
value
(),
fallback
);
static
const
in
t
result
=
value_of
(
T
::
value
(),
fallback
);
return
result
;
return
result
;
}
}
...
...
src/include/migraphx/file_buffer.hpp
View file @
94e3a2e4
...
@@ -11,7 +11,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -11,7 +11,7 @@ inline namespace MIGRAPHX_INLINE_NS {
std
::
vector
<
char
>
read_buffer
(
const
std
::
string
&
filename
);
std
::
vector
<
char
>
read_buffer
(
const
std
::
string
&
filename
);
std
::
string
read_string
(
const
std
::
string
&
filename
);
std
::
string
read_string
(
const
std
::
string
&
filename
);
void
write_buffer
(
const
std
::
string
&
filename
,
const
char
*
buffer
,
std
::
size_
t
size
);
void
write_buffer
(
const
std
::
string
&
filename
,
const
char
*
buffer
,
in
t
size
);
void
write_buffer
(
const
std
::
string
&
filename
,
const
std
::
vector
<
char
>&
buffer
);
void
write_buffer
(
const
std
::
string
&
filename
,
const
std
::
vector
<
char
>&
buffer
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/include/migraphx/functional.hpp
View file @
94e3a2e4
...
@@ -35,7 +35,7 @@ struct fix_f
...
@@ -35,7 +35,7 @@ struct fix_f
}
}
};
};
template
<
std
::
size_
t
...>
template
<
in
t
...>
struct
seq
struct
seq
{
{
using
type
=
seq
;
using
type
=
seq
;
...
@@ -44,12 +44,12 @@ struct seq
...
@@ -44,12 +44,12 @@ struct seq
template
<
class
,
class
>
template
<
class
,
class
>
struct
merge_seq
;
struct
merge_seq
;
template
<
std
::
size_t
...
Xs
,
std
::
size_
t
...
Ys
>
template
<
int
...
Xs
,
in
t
...
Ys
>
struct
merge_seq
<
seq
<
Xs
...
>
,
seq
<
Ys
...
>>
:
seq
<
Xs
...,
(
sizeof
...(
Xs
)
+
Ys
)...
>
struct
merge_seq
<
seq
<
Xs
...
>
,
seq
<
Ys
...
>>
:
seq
<
Xs
...,
(
sizeof
...(
Xs
)
+
Ys
)...
>
{
{
};
};
template
<
std
::
size_
t
N
>
template
<
in
t
N
>
struct
gens
:
merge_seq
<
typename
gens
<
N
/
2
>::
type
,
typename
gens
<
N
-
N
/
2
>::
type
>
struct
gens
:
merge_seq
<
typename
gens
<
N
/
2
>::
type
,
typename
gens
<
N
-
N
/
2
>::
type
>
{
{
};
};
...
@@ -63,27 +63,27 @@ struct gens<1> : seq<0>
...
@@ -63,27 +63,27 @@ struct gens<1> : seq<0>
{
{
};
};
template
<
class
F
,
std
::
size_
t
...
Ns
>
template
<
class
F
,
in
t
...
Ns
>
constexpr
void
repeat_c_impl
(
F
f
,
seq
<
Ns
...
>
)
constexpr
void
repeat_c_impl
(
F
f
,
seq
<
Ns
...
>
)
{
{
swallow
{(
f
(
std
::
integral_constant
<
std
::
size_
t
,
Ns
>
{}),
0
)...};
swallow
{(
f
(
std
::
integral_constant
<
in
t
,
Ns
>
{}),
0
)...};
}
}
template
<
class
F
,
std
::
size_
t
...
Ns
>
template
<
class
F
,
in
t
...
Ns
>
constexpr
auto
sequence_c_impl
(
F
&&
f
,
seq
<
Ns
...
>
)
constexpr
auto
sequence_c_impl
(
F
&&
f
,
seq
<
Ns
...
>
)
{
{
return
f
(
std
::
integral_constant
<
std
::
size_
t
,
Ns
>
{}...);
return
f
(
std
::
integral_constant
<
in
t
,
Ns
>
{}...);
}
}
}
// namespace detail
}
// namespace detail
template
<
std
::
size_
t
N
,
class
F
>
template
<
in
t
N
,
class
F
>
constexpr
void
repeat_c
(
F
f
)
constexpr
void
repeat_c
(
F
f
)
{
{
detail
::
repeat_c_impl
(
f
,
detail
::
gens
<
N
>
{});
detail
::
repeat_c_impl
(
f
,
detail
::
gens
<
N
>
{});
}
}
template
<
std
::
size_
t
N
,
class
F
>
template
<
in
t
N
,
class
F
>
constexpr
auto
sequence_c
(
F
&&
f
)
constexpr
auto
sequence_c
(
F
&&
f
)
{
{
return
detail
::
sequence_c_impl
(
f
,
detail
::
gens
<
N
>
{});
return
detail
::
sequence_c_impl
(
f
,
detail
::
gens
<
N
>
{});
...
...
src/include/migraphx/gemm.hpp
View file @
94e3a2e4
...
@@ -12,9 +12,9 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -12,9 +12,9 @@ inline namespace MIGRAPHX_INLINE_NS {
template
<
class
T
,
class
F
>
template
<
class
T
,
class
F
>
void
gemm
(
tensor_view
<
T
>
cmat
,
tensor_view
<
T
>
amat
,
tensor_view
<
T
>
bmat
,
F
alpha
,
F
beta
)
void
gemm
(
tensor_view
<
T
>
cmat
,
tensor_view
<
T
>
amat
,
tensor_view
<
T
>
bmat
,
F
alpha
,
F
beta
)
{
{
std
::
size_
t
n_dims
=
cmat
.
get_shape
().
lens
().
size
();
in
t
n_dims
=
cmat
.
get_shape
().
lens
().
size
();
std
::
size_
t
dim_0
=
n_dims
-
2
;
in
t
dim_0
=
n_dims
-
2
;
std
::
size_
t
dim_1
=
n_dims
-
1
;
in
t
dim_1
=
n_dims
-
1
;
auto
k
=
amat
.
get_shape
().
lens
()[
dim_1
];
auto
k
=
amat
.
get_shape
().
lens
()[
dim_1
];
assert
(
amat
.
get_shape
().
lens
()[
dim_1
]
==
bmat
.
get_shape
().
lens
()[
dim_0
]);
assert
(
amat
.
get_shape
().
lens
()[
dim_1
]
==
bmat
.
get_shape
().
lens
()[
dim_0
]);
...
...
src/include/migraphx/instruction_ref.hpp
View file @
94e3a2e4
...
@@ -21,7 +21,7 @@ template <>
...
@@ -21,7 +21,7 @@ template <>
struct
hash
<
migraphx
::
instruction_ref
>
struct
hash
<
migraphx
::
instruction_ref
>
{
{
using
argument_type
=
migraphx
::
instruction_ref
;
using
argument_type
=
migraphx
::
instruction_ref
;
using
result_type
=
std
::
size_
t
;
using
result_type
=
in
t
;
result_type
operator
()(
const
migraphx
::
instruction_ref
&
x
)
const
noexcept
result_type
operator
()(
const
migraphx
::
instruction_ref
&
x
)
const
noexcept
{
{
return
std
::
hash
<
migraphx
::
instruction
*>
{}(
migraphx
::
as_address
(
x
));
return
std
::
hash
<
migraphx
::
instruction
*>
{}(
migraphx
::
as_address
(
x
));
...
...
src/include/migraphx/json.hpp
View file @
94e3a2e4
...
@@ -10,7 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -10,7 +10,7 @@ inline namespace MIGRAPHX_INLINE_NS {
std
::
string
to_json_string
(
const
value
&
val
);
std
::
string
to_json_string
(
const
value
&
val
);
value
from_json_string
(
const
std
::
string
&
str
);
value
from_json_string
(
const
std
::
string
&
str
);
value
from_json_string
(
const
char
*
str
,
std
::
size_
t
size
);
value
from_json_string
(
const
char
*
str
,
in
t
size
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/include/migraphx/load_save.hpp
View file @
94e3a2e4
...
@@ -16,7 +16,7 @@ struct file_options
...
@@ -16,7 +16,7 @@ struct file_options
program
load
(
const
std
::
string
&
filename
,
const
file_options
&
options
=
file_options
{});
program
load
(
const
std
::
string
&
filename
,
const
file_options
&
options
=
file_options
{});
program
load_buffer
(
const
std
::
vector
<
char
>&
buffer
,
const
file_options
&
options
=
file_options
{});
program
load_buffer
(
const
std
::
vector
<
char
>&
buffer
,
const
file_options
&
options
=
file_options
{});
program
program
load_buffer
(
const
char
*
buffer
,
std
::
size_
t
size
,
const
file_options
&
options
=
file_options
{});
load_buffer
(
const
char
*
buffer
,
in
t
size
,
const
file_options
&
options
=
file_options
{});
void
save
(
const
program
&
p
,
void
save
(
const
program
&
p
,
const
std
::
string
&
filename
,
const
std
::
string
&
filename
,
...
...
src/include/migraphx/make_shared_array.hpp
View file @
94e3a2e4
...
@@ -8,7 +8,7 @@ namespace migraphx {
...
@@ -8,7 +8,7 @@ namespace migraphx {
inline
namespace
MIGRAPHX_INLINE_NS
{
inline
namespace
MIGRAPHX_INLINE_NS
{
template
<
typename
T
>
template
<
typename
T
>
std
::
shared_ptr
<
T
>
make_shared_array
(
size_
t
size
)
std
::
shared_ptr
<
T
>
make_shared_array
(
in
t
size
)
{
{
return
std
::
shared_ptr
<
T
>
(
new
T
[
size
](),
std
::
default_delete
<
T
[]
>
());
// NOLINT
return
std
::
shared_ptr
<
T
>
(
new
T
[
size
](),
std
::
default_delete
<
T
[]
>
());
// NOLINT
}
}
...
...
src/include/migraphx/module.hpp
View file @
94e3a2e4
...
@@ -127,7 +127,7 @@ struct module
...
@@ -127,7 +127,7 @@ struct module
bool
has_instruction
(
instruction_ref
ins
)
const
;
bool
has_instruction
(
instruction_ref
ins
)
const
;
std
::
size_
t
size
()
const
;
in
t
size
()
const
;
instruction_ref
begin
()
const
;
instruction_ref
begin
()
const
;
instruction_ref
end
()
const
;
instruction_ref
end
()
const
;
...
...
src/include/migraphx/msgpack.hpp
View file @
94e3a2e4
...
@@ -9,7 +9,7 @@ inline namespace MIGRAPHX_INLINE_NS {
...
@@ -9,7 +9,7 @@ inline namespace MIGRAPHX_INLINE_NS {
std
::
vector
<
char
>
to_msgpack
(
const
value
&
v
);
std
::
vector
<
char
>
to_msgpack
(
const
value
&
v
);
value
from_msgpack
(
const
std
::
vector
<
char
>&
buffer
);
value
from_msgpack
(
const
std
::
vector
<
char
>&
buffer
);
value
from_msgpack
(
const
char
*
buffer
,
std
::
size_
t
size
);
value
from_msgpack
(
const
char
*
buffer
,
in
t
size
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// namespace migraphx
...
...
src/include/migraphx/op/capture.hpp
View file @
94e3a2e4
...
@@ -18,8 +18,8 @@ namespace op {
...
@@ -18,8 +18,8 @@ namespace op {
struct
capture
struct
capture
{
{
std
::
size_
t
ins_index
;
in
t
ins_index
;
std
::
function
<
void
(
std
::
size_
t
ins_index
,
std
::
vector
<
argument
>
)
>
f
{};
std
::
function
<
void
(
in
t
ins_index
,
std
::
vector
<
argument
>
)
>
f
{};
template
<
class
Self
,
class
F
>
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
static
auto
reflect
(
Self
&
self
,
F
f
)
{
{
...
...
src/include/migraphx/op/dot.hpp
View file @
94e3a2e4
...
@@ -39,8 +39,8 @@ struct dot
...
@@ -39,8 +39,8 @@ struct dot
"} x {"
+
to_string_range
(
b
.
lens
())
+
"}"
);
"} x {"
+
to_string_range
(
b
.
lens
())
+
"}"
);
}
}
std
::
size_
t
dim_0
=
a
.
lens
().
size
()
-
2
;
in
t
dim_0
=
a
.
lens
().
size
()
-
2
;
std
::
size_
t
dim_1
=
a
.
lens
().
size
()
-
1
;
in
t
dim_1
=
a
.
lens
().
size
()
-
1
;
if
(
a
.
lens
()[
dim_1
]
!=
b
.
lens
()[
dim_0
])
if
(
a
.
lens
()[
dim_1
]
!=
b
.
lens
()[
dim_0
])
{
{
MIGRAPHX_THROW
(
"DOT: inner dimensions do not match: {"
+
to_string_range
(
a
.
lens
())
+
MIGRAPHX_THROW
(
"DOT: inner dimensions do not match: {"
+
to_string_range
(
a
.
lens
())
+
...
...
src/include/migraphx/op/gather.hpp
View file @
94e3a2e4
...
@@ -62,7 +62,7 @@ struct gather
...
@@ -62,7 +62,7 @@ struct gather
argument
result
{
output_shape
};
argument
result
{
output_shape
};
// negative axis means counting dimensions from back
// negative axis means counting dimensions from back
auto
lens
=
args
[
0
].
get_shape
().
lens
();
auto
lens
=
args
[
0
].
get_shape
().
lens
();
std
::
size_
t
axis_dim_size
=
lens
[
axis
];
in
t
axis_dim_size
=
lens
[
axis
];
// max dimension in axis
// max dimension in axis
visit_all
(
result
,
args
[
0
])([
&
](
auto
output
,
auto
data
)
{
visit_all
(
result
,
args
[
0
])([
&
](
auto
output
,
auto
data
)
{
args
[
1
].
visit
([
&
](
auto
indices
)
{
args
[
1
].
visit
([
&
](
auto
indices
)
{
...
...
src/include/migraphx/op/get_tuple_elem.hpp
View file @
94e3a2e4
...
@@ -15,7 +15,7 @@ namespace op {
...
@@ -15,7 +15,7 @@ namespace op {
struct
get_tuple_elem
struct
get_tuple_elem
{
{
std
::
size_
t
index
=
0
;
in
t
index
=
0
;
template
<
class
Self
,
class
F
>
template
<
class
Self
,
class
F
>
static
auto
reflect
(
Self
&
self
,
F
f
)
static
auto
reflect
(
Self
&
self
,
F
f
)
...
...
src/include/migraphx/op/loop.hpp
View file @
94e3a2e4
...
@@ -85,7 +85,7 @@ struct loop
...
@@ -85,7 +85,7 @@ struct loop
auto
*
in_data
=
iter_stat
.
data
();
auto
*
in_data
=
iter_stat
.
data
();
auto
*
out_data
=
scan_out
.
data
();
auto
*
out_data
=
scan_out
.
data
();
std
::
size_
t
out_size
=
iter_stat
.
get_shape
().
bytes
();
in
t
out_size
=
iter_stat
.
get_shape
().
bytes
();
assert
((
iter
+
1
)
*
out_size
<=
scan_out
.
get_shape
().
bytes
());
assert
((
iter
+
1
)
*
out_size
<=
scan_out
.
get_shape
().
bytes
());
std
::
copy
(
in_data
,
in_data
+
out_size
,
out_data
+
iter
*
out_size
);
std
::
copy
(
in_data
,
in_data
+
out_size
,
out_data
+
iter
*
out_size
);
}
}
...
...
Prev
1
2
3
4
5
6
…
13
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