Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
e9444492
Commit
e9444492
authored
3 years ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
starpu: small change in the interface to use the CHAM_tile_get_ptr function and add traces
parent
94ffbb67
No related branches found
No related tags found
1 merge request
!269
StarPU: Prepare the filed for recursive algorithms
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/starpu/interface/cham_tile_interface.c
+29
-6
29 additions, 6 deletions
runtime/starpu/interface/cham_tile_interface.c
with
29 additions
and
6 deletions
runtime/starpu/interface/cham_tile_interface.c
+
29
−
6
View file @
e9444492
...
...
@@ -536,10 +536,18 @@ static starpu_ssize_t
cti_describe
(
void
*
data_interface
,
char
*
buf
,
size_t
size
)
{
starpu_cham_tile_interface_t
*
cham_tile_interface
=
(
starpu_cham_tile_interface_t
*
)
data_interface
;
#if defined(CHAMELEON_KERNELS_TRACE)
return
snprintf
(
buf
,
size
,
"M%ux%ux%u %s"
,
(
unsigned
)
cham_tile_interface
->
tile
.
m
,
(
unsigned
)
cham_tile_interface
->
tile
.
n
,
(
unsigned
)
cham_tile_interface
->
flttype
,
cham_tile_interface
->
tile
.
name
);
#else
return
snprintf
(
buf
,
size
,
"M%ux%ux%u"
,
(
unsigned
)
cham_tile_interface
->
tile
.
m
,
(
unsigned
)
cham_tile_interface
->
tile
.
n
,
(
unsigned
)
cham_tile_interface
->
flttype
);
#endif
}
static
int
cti_copy_any_to_any
(
void
*
src_interface
,
unsigned
src_node
,
...
...
@@ -554,11 +562,23 @@ static int cti_copy_any_to_any( void *src_interface, unsigned src_node,
size_t
ld_dst
=
cham_tile_dst
->
tile
.
ld
;
int
ret
=
0
;
void
*
src_mat
=
CHAM_tile_get_ptr
(
&
(
cham_tile_src
->
tile
)
);
void
*
dst_mat
=
CHAM_tile_get_ptr
(
&
(
cham_tile_dst
->
tile
)
);
#if defined(CHAMELEON_KERNELS_TRACE)
fprintf
(
stderr
,
"[ANY->ANY] src(%s, type:%s, m=%d, n=%d, ld=%d, ptr:%p) dest(%s, type:%s, m=%d, n=%d, ld=%d, ptr:%p)
\n
"
,
cham_tile_src
->
tile
.
name
,
CHAM_tile_get_typestr
(
&
(
cham_tile_src
->
tile
)
),
cham_tile_src
->
tile
.
m
,
cham_tile_src
->
tile
.
n
,
cham_tile_src
->
tile
.
ld
,
src_mat
,
cham_tile_dst
->
tile
.
name
,
CHAM_tile_get_typestr
(
&
(
cham_tile_dst
->
tile
)
),
cham_tile_dst
->
tile
.
m
,
cham_tile_dst
->
tile
.
n
,
cham_tile_dst
->
tile
.
ld
,
dst_mat
);
#endif
#if defined(HAVE_STARPU_INTERFACE_COPY2D)
ld_src
*=
elemsize
;
ld_dst
*=
elemsize
;
if
(
starpu_interface_copy2d
(
(
uintptr_t
)
cham_tile_src
->
tile
.
mat
,
0
,
src_node
,
(
uintptr_t
)
cham_tile_dst
->
tile
.
mat
,
0
,
dst_node
,
if
(
starpu_interface_copy2d
(
(
uintptr_t
)
src_
mat
,
0
,
src_node
,
(
uintptr_t
)
dst_
mat
,
0
,
dst_node
,
m
*
elemsize
,
n
,
ld_src
,
ld_dst
,
async_data
)
)
{
ret
=
-
EAGAIN
;
}
...
...
@@ -566,8 +586,8 @@ static int cti_copy_any_to_any( void *src_interface, unsigned src_node,
if
(
(
ld_src
==
m
)
&&
(
ld_dst
==
m
)
)
{
/* Optimize unpartitioned and y-partitioned cases */
if
(
starpu_interface_copy
(
(
uintptr_t
)
cham_tile_src
->
tile
.
mat
,
0
,
src_node
,
(
uintptr_t
)
cham_tile_dst
->
tile
.
mat
,
0
,
dst_node
,
if
(
starpu_interface_copy
(
(
uintptr_t
)
src_
mat
,
0
,
src_node
,
(
uintptr_t
)
dst_
mat
,
0
,
dst_node
,
m
*
n
*
elemsize
,
async_data
)
)
{
ret
=
-
EAGAIN
;
...
...
@@ -584,8 +604,8 @@ static int cti_copy_any_to_any( void *src_interface, unsigned src_node,
uint32_t
src_offset
=
y
*
ld_src
;
uint32_t
dst_offset
=
y
*
ld_dst
;
if
(
starpu_interface_copy
(
(
uintptr_t
)
cham_tile_src
->
tile
.
mat
,
src_offset
,
src_node
,
(
uintptr_t
)
cham_tile_dst
->
tile
.
mat
,
dst_offset
,
dst_node
,
if
(
starpu_interface_copy
(
(
uintptr_t
)
src
mat
,
src_offset
,
src_node
,
(
uintptr_t
)
dst
mat
,
dst_offset
,
dst_node
,
m
*
elemsize
,
async_data
)
)
{
ret
=
-
EAGAIN
;
...
...
@@ -651,6 +671,9 @@ starpu_cham_tile_register( starpu_data_handle_t *handleptr,
if
(
tile
->
format
&
CHAMELEON_TILE_FULLRANK
)
{
cham_tile_interface
.
allocsize
=
tile
->
m
*
tile
->
n
*
elemsize
;
}
else
if
(
tile
->
format
&
CHAMELEON_TILE_DESC
)
{
/* Needed in case starpu ask for it */
cham_tile_interface
.
allocsize
=
tile
->
m
*
tile
->
n
*
elemsize
;
}
else
if
(
tile
->
format
&
CHAMELEON_TILE_HMAT
)
{
/* For hmat, allocated data will be handled by hmat library. StarPU cannot allocate it for the library */
cham_tile_interface
.
allocsize
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment