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
8fa4cd1b
Commit
8fa4cd1b
authored
May 30, 2023
by
Paul
Browse files
Tidy fixes
parent
9651e509
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
src/include/migraphx/hash.hpp
src/include/migraphx/hash.hpp
+1
-1
src/include/migraphx/value.hpp
src/include/migraphx/value.hpp
+1
-1
src/targets/gpu/device/multinomial.cpp
src/targets/gpu/device/multinomial.cpp
+1
-1
No files found.
src/include/migraphx/hash.hpp
View file @
8fa4cd1b
...
...
@@ -16,7 +16,7 @@ std::size_t hash_value(const T& v)
template
<
class
T
>
void
hash_combine
(
std
::
size_t
&
seed
,
const
T
&
v
)
{
seed
^=
hash_value
(
v
)
+
0x9e3779b9
+
(
seed
<<
6
)
+
(
seed
>>
2
);
seed
^=
hash_value
(
v
)
+
0x9e3779b9
+
(
seed
<<
6
u
)
+
(
seed
>>
2
u
);
}
}
// namespace MIGRAPHX_INLINE_NS
...
...
src/include/migraphx/value.hpp
View file @
8fa4cd1b
...
...
@@ -489,7 +489,7 @@ struct hash<migraphx::value>
{
using
argument_type
=
migraphx
::
value
;
using
result_type
=
std
::
size_t
;
result_type
operator
()(
const
migraphx
::
value
&
x
)
const
noexcept
{
return
x
.
hash
();
}
result_type
operator
()(
const
migraphx
::
value
&
x
)
const
{
return
x
.
hash
();
}
};
}
// namespace std
...
...
src/targets/gpu/device/multinomial.cpp
View file @
8fa4cd1b
...
...
@@ -75,7 +75,7 @@ void multinomial(hipStream_t stream,
auto
idx
=
output
.
get_shape
().
multi
(
i
);
auto
cdf_begin
=
cdf
.
begin
()
+
(
idx
.
front
()
*
class_size
);
auto
cdf_end
=
cdf_begin
+
class_size
;
auto
sample_iter
=
auto
*
sample_iter
=
upper_bound
(
cdf_begin
,
cdf_end
,
dist
[
i
]
*
*
(
std
::
prev
(
cdf_end
)));
output
[
i
]
=
std
::
distance
(
cdf_begin
,
sample_iter
);
});
...
...
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