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
4643f0e6
Commit
4643f0e6
authored
Sep 14, 2022
by
Po-Yen, Chen
Browse files
Intialize random values in range
parent
0d5a0bc9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
example/37_permute/run_permute_bundle_example.inc
example/37_permute/run_permute_bundle_example.inc
+2
-5
example/37_permute/run_permute_element_example.inc
example/37_permute/run_permute_element_example.inc
+1
-1
No files found.
example/37_permute/run_permute_bundle_example.inc
View file @
4643f0e6
...
...
@@ -18,11 +18,8 @@ bool run_permute_bundle(const Problem& problem)
// initialize tensor by assigning DataType values
using
std
::
data
,
std
::
size
;
{
auto
*
const
elems
=
reinterpret_cast
<
DataType
*>
(
data
(
a
));
ck
::
utils
::
FillUniformDistribution
<
DataType
>
{
-
1.
f
,
1.
f
}(
elems
,
elems
+
(
a
.
GetElementSpaceSize
()
*
NumElemsInBundle
));
}
ck
::
utils
::
FillUniformDistribution
<
DataType
>
{
-
1.
f
,
1.
f
}(
ck
::
span
<
DataType
>
{
reinterpret_cast
<
DataType
*>
(
data
(
a
)),
a
.
GetElementSpaceSize
()
*
NumElemsInBundle
});
DeviceMem
a_device_buf
(
a
.
GetElementSpaceSizeInBytes
());
DeviceMem
b_device_buf
(
b
.
GetElementSpaceSizeInBytes
());
...
...
example/37_permute/run_permute_element_example.inc
View file @
4643f0e6
...
...
@@ -14,7 +14,7 @@ bool run_permute_element(const Problem& problem)
Tensor
<
ADataType
>
a
(
shape
);
Tensor
<
BDataType
>
b
(
transposed_shape
);
ck
::
utils
::
FillUniformDistribution
<
ADataType
>
{
-
1.
f
,
1.
f
}(
begin
(
a
),
end
(
a
)
);
ck
::
utils
::
FillUniformDistribution
<
ADataType
>
{
-
1.
f
,
1.
f
}(
a
);
DeviceMem
a_device_buf
(
a
.
GetElementSpaceSizeInBytes
());
DeviceMem
b_device_buf
(
b
.
GetElementSpaceSizeInBytes
());
...
...
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