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_ROCM
Commits
ee8937a8
"...resnet50_tensorflow.git" did not exist on "19ed6e59e7d393dc77bb54430677ae92bc32a810"
Commit
ee8937a8
authored
Feb 12, 2025
by
Rostyslav Geyyer
Browse files
Fix conversion logic
parent
ecd638f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/ck/utility/type_convert.hpp
include/ck/utility/type_convert.hpp
+4
-4
No files found.
include/ck/utility/type_convert.hpp
View file @
ee8937a8
...
@@ -742,8 +742,8 @@ inline __host__ __device__ f4x2_t f4_convert_rne(float2_t x, float scale = 1.0f)
...
@@ -742,8 +742,8 @@ inline __host__ __device__ f4x2_t f4_convert_rne(float2_t x, float scale = 1.0f)
uint32_t
bitwise
;
uint32_t
bitwise
;
f4x2_t
f4x2_array
[
4
];
f4x2_t
f4x2_array
[
4
];
}
value
{
0
};
}
value
{
0
};
uint8_t
l
=
utils
::
sat_convert_to_type
<
f4_t
>
(
x
[
1
]
/
scale
);
uint8_t
l
=
utils
::
sat_convert_to_type
<
f4_t
>
(
x
[
0
]
/
scale
);
uint8_t
h
=
utils
::
sat_convert_to_type
<
f4_t
>
(
x
[
0
]
/
scale
);
uint8_t
h
=
utils
::
sat_convert_to_type
<
f4_t
>
(
x
[
1
]
/
scale
);
value
.
bitwise
=
(
h
<<
4
)
|
l
;
value
.
bitwise
=
(
h
<<
4
)
|
l
;
return
value
.
f4x2_array
[
0
];
return
value
.
f4x2_array
[
0
];
#endif
#endif
...
@@ -969,8 +969,8 @@ inline __host__ __device__ f4x2_t f4_convert_sr(float2_t x, float scale = 1.0f)
...
@@ -969,8 +969,8 @@ inline __host__ __device__ f4x2_t f4_convert_sr(float2_t x, float scale = 1.0f)
uint32_t
bitwise
;
uint32_t
bitwise
;
f4x2_t
f4x2_array
[
4
];
f4x2_t
f4x2_array
[
4
];
}
value
{
0
};
}
value
{
0
};
uint8_t
l
=
utils
::
sat_convert_to_type_sr
<
f4_t
>
(
x
[
1
]
/
scale
,
rng
);
uint8_t
l
=
utils
::
sat_convert_to_type_sr
<
f4_t
>
(
x
[
0
]
/
scale
,
rng
);
uint8_t
h
=
utils
::
sat_convert_to_type_sr
<
f4_t
>
(
x
[
0
]
/
scale
,
rng
);
uint8_t
h
=
utils
::
sat_convert_to_type_sr
<
f4_t
>
(
x
[
1
]
/
scale
,
rng
);
value
.
bitwise
=
(
h
<<
4
)
|
l
;
value
.
bitwise
=
(
h
<<
4
)
|
l
;
return
value
.
f4x2_array
[
0
];
return
value
.
f4x2_array
[
0
];
#endif
#endif
...
...
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