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
yangql
composable_kernel-1
Commits
08c69243
Commit
08c69243
authored
Jun 06, 2019
by
Chao Liu
Browse files
fix build issue
parent
7a89684f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
src/include/ConstantTensorDescriptor.hip.hpp
src/include/ConstantTensorDescriptor.hip.hpp
+7
-5
No files found.
src/include/ConstantTensorDescriptor.hip.hpp
View file @
08c69243
...
@@ -66,10 +66,11 @@ struct ConstantTensorDescriptor
...
@@ -66,10 +66,11 @@ struct ConstantTensorDescriptor
{
{
}
}
template
<
class
X
>
template
<
index_t
IDim_
>
__host__
__device__
constexpr
void
operator
()(
X
IDim
)
const
__host__
__device__
constexpr
void
operator
()(
Number
<
IDim
_
>
)
const
{
{
constexpr
auto
IDim_p1
=
IDim
+
Number
<
1
>
{};
constexpr
auto
IDim
=
Number
<
IDim_
>
{};
constexpr
auto
IDim_p1
=
Number
<
IDim_
+
1
>
{};
is_continuous
=
is_continuous
=
is_continuous
&&
(
GetStride
(
IDim
)
>=
GetStride
(
IDim_p1
)
&&
is_continuous
&&
(
GetStride
(
IDim
)
>=
GetStride
(
IDim_p1
)
&&
...
@@ -178,9 +179,10 @@ struct ConstantTensorDescriptor
...
@@ -178,9 +179,10 @@ struct ConstantTensorDescriptor
{
{
}
}
template
<
class
X
>
template
<
class
IDim_
>
__host__
__device__
constexpr
void
operator
()(
X
IDim
)
const
__host__
__device__
constexpr
void
operator
()(
IDim
_
)
const
{
{
constexpr
auto
IDim
=
IDim_
{};
constexpr
index_t
stride
=
PackedStrides
::
Get
(
IDim
);
constexpr
index_t
stride
=
PackedStrides
::
Get
(
IDim
);
multi_id
.
Set
(
IDim
,
id
/
stride
);
multi_id
.
Set
(
IDim
,
id
/
stride
);
id
-=
multi_id
[
IDim
]
*
stride
;
id
-=
multi_id
[
IDim
]
*
stride
;
...
...
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