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
composable_kernel
Commits
b7fa6bb1
Commit
b7fa6bb1
authored
Jun 25, 2022
by
Chaitanya Inumella
Browse files
Added the change to fix the float-to-int warning errors
parent
7ee6c2c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
library/include/ck/library/host_tensor/host_tensor_generator.hpp
.../include/ck/library/host_tensor/host_tensor_generator.hpp
+2
-2
No files found.
library/include/ck/library/host_tensor/host_tensor_generator.hpp
View file @
b7fa6bb1
...
...
@@ -134,7 +134,7 @@ struct GeneratorTensor_cuTensor
template
<
typename
...
Is
>
T
operator
()(
Is
...)
{
float
tmp
=
(
(
float
(
std
::
rand
())
)
/
RAND_MAX
-
0.5
)
*
100
;
float
tmp
=
(
float
(
std
::
rand
())
/
float
(
RAND_MAX
)
-
0.5
)
*
100
;
return
static_cast
<
T
>
(
tmp
);
}
};
...
...
@@ -148,7 +148,7 @@ struct GeneratorTensor_cuTensor<ck::bhalf_t>
template
<
typename
...
Is
>
ck
::
bhalf_t
operator
()(
Is
...)
{
float
tmp
=
(
(
float
(
std
::
rand
())
)
/
RAND_MAX
-
0.5
)
*
100
;
float
tmp
=
(
float
(
std
::
rand
())
/
float
(
RAND_MAX
)
-
0.5
)
*
100
;
return
ck
::
type_convert
<
ck
::
bhalf_t
>
(
tmp
);
}
};
...
...
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