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
0f620a90
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "97ecee9ebb41faf2d57ffbf835ec8f5076e71edd"
Commit
0f620a90
authored
Apr 04, 2019
by
Jing Zhang
Browse files
add debug
parent
fbc7817b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
src/include/inline_asm.hpp
src/include/inline_asm.hpp
+15
-1
No files found.
src/include/inline_asm.hpp
View file @
0f620a90
...
@@ -4,8 +4,15 @@ typedef float Float4 __attribute__((ext_vector_type(4)));
...
@@ -4,8 +4,15 @@ typedef float Float4 __attribute__((ext_vector_type(4)));
extern
"C"
__attribute__
((
address_space
(
3
)))
void
*
__to_local
(
void
*
p
)[[
hc
]];
extern
"C"
__attribute__
((
address_space
(
3
)))
void
*
__to_local
(
void
*
p
)[[
hc
]];
#define NO_VM_WAIT 0
#define NO_LGKM_WAIT 0
#define NO_DS_READ 0
#define NO_DS_WRITE 0
#define NO_GLB_READ 0
inline
__device__
void
vmcnt
(
int
cnt
)
inline
__device__
void
vmcnt
(
int
cnt
)
{
{
#if !NO_VM_WAIT
if
(
cnt
==
0
)
if
(
cnt
==
0
)
{
{
asm
volatile
(
"
\n
\
asm
volatile
(
"
\n
\
...
@@ -34,11 +41,12 @@ inline __device__ void vmcnt(int cnt)
...
@@ -34,11 +41,12 @@ inline __device__ void vmcnt(int cnt)
{
{
assert
(
0
);
assert
(
0
);
}
}
#endif
}
}
inline
__device__
void
lgkmcnt
(
int
cnt
)
inline
__device__
void
lgkmcnt
(
int
cnt
)
{
{
#if
1
#if
!NO_LGKM_WAIT
if
(
cnt
==
0
)
if
(
cnt
==
0
)
{
{
asm
volatile
(
"
\n
\
asm
volatile
(
"
\n
\
...
@@ -181,6 +189,7 @@ inline __device__ void outerProduct8x8(const Float4* a, const Float4* b, Float4*
...
@@ -181,6 +189,7 @@ inline __device__ void outerProduct8x8(const Float4* a, const Float4* b, Float4*
inline
__device__
void
ds_read_b128
(
Float4
&
r
,
void
*
lds
,
int
offset
=
0
)
inline
__device__
void
ds_read_b128
(
Float4
&
r
,
void
*
lds
,
int
offset
=
0
)
{
{
#if !NO_DS_READ
if
(
offset
==
0
)
if
(
offset
==
0
)
{
{
asm
volatile
(
"
\n
\
asm
volatile
(
"
\n
\
...
@@ -401,22 +410,27 @@ inline __device__ void ds_read_b128(Float4& r, void* lds, int offset = 0)
...
@@ -401,22 +410,27 @@ inline __device__ void ds_read_b128(Float4& r, void* lds, int offset = 0)
{
{
assert
(
0
);
assert
(
0
);
}
}
#endif
}
}
inline
__device__
void
global_load
(
Float4
&
r
,
Float4
*
ptr
)
inline
__device__
void
global_load
(
Float4
&
r
,
Float4
*
ptr
)
{
{
#if !NO_GLB_READ
asm
volatile
(
"
\n
\
asm
volatile
(
"
\n
\
global_load_dwordx4 %0, %1, off
\n
\
global_load_dwordx4 %0, %1, off
\n
\
"
"
:
"=v"
(
r
)
:
"=v"
(
r
)
:
"v"
(
ptr
));
:
"v"
(
ptr
));
#endif
}
}
inline
__device__
void
ds_write_b128
(
Float4
&
r
,
void
*
lds
,
int
offset
=
0
)
inline
__device__
void
ds_write_b128
(
Float4
&
r
,
void
*
lds
,
int
offset
=
0
)
{
{
#if !NO_DS_WRITE
asm
volatile
(
"
\n
\
asm
volatile
(
"
\n
\
ds_write_b128 %0, %1
\n
\
ds_write_b128 %0, %1
\n
\
"
"
:
:
:
"v"
(
__to_local
(
lds
)),
"v"
(
r
));
:
"v"
(
__to_local
(
lds
)),
"v"
(
r
));
#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