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
Admin message
GitLab upgrade completed. Current version is 17.8.2.
Show more breadcrumbs
solverstack
Chameleon
Commits
5876ada0
Commit
5876ada0
authored
3 weeks ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
starpu/codelet: Add new task submit to codelet_ztradd.c
parent
cabbcdbe
No related branches found
Branches containing commit
No related tags found
1 merge request
!512
Restructuration of the codelets
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
runtime/starpu/codelets/codelet_ztradd.c
+88
-7
88 additions, 7 deletions
runtime/starpu/codelets/codelet_ztradd.c
with
88 additions
and
7 deletions
runtime/starpu/codelets/codelet_ztradd.c
+
88
−
7
View file @
5876ada0
...
...
@@ -24,10 +24,10 @@
#include
"runtime_codelet_z.h"
struct
cl_ztradd_args_s
{
cham_uplo_t
uplo
;
cham_trans_t
trans
;
int
m
;
int
n
;
cham_uplo_t
uplo
;
cham_trans_t
trans
;
int
m
;
int
n
;
CHAMELEON_Complex64_t
alpha
;
CHAMELEON_Complex64_t
beta
;
};
...
...
@@ -53,6 +53,7 @@ cl_ztradd_cpu_func(void *descr[], void *cl_arg)
*/
CODELETS_CPU
(
ztradd
,
cl_ztradd_cpu_func
)
#if defined(CHAMELEON_STARPU_USE_INSERT)
void
INSERT_TASK_ztradd
(
const
RUNTIME_option_t
*
options
,
cham_uplo_t
uplo
,
cham_trans_t
trans
,
int
m
,
int
n
,
int
nb
,
CHAMELEON_Complex64_t
alpha
,
const
CHAM_desc_t
*
A
,
int
Am
,
int
An
,
...
...
@@ -64,11 +65,11 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
return
;
}
struct
cl_ztradd_args_s
*
clargs
=
NULL
;
void
(
*
callback
)(
void
*
);
int
accessB
;
int
exec
=
0
;
struct
cl_ztradd_args_s
*
clargs
=
NULL
;
int
exec
=
0
;
const
char
*
cl_name
=
"ztradd"
;
int
accessB
;
/* Handle cache */
CHAMELEON_BEGIN_ACCESS_DECLARATION
;
...
...
@@ -110,3 +111,83 @@ void INSERT_TASK_ztradd( const RUNTIME_option_t *options,
(
void
)
nb
;
}
#else
void
INSERT_TASK_ztradd
(
const
RUNTIME_option_t
*
options
,
cham_uplo_t
uplo
,
cham_trans_t
trans
,
int
m
,
int
n
,
int
nb
,
CHAMELEON_Complex64_t
alpha
,
const
CHAM_desc_t
*
A
,
int
Am
,
int
An
,
CHAMELEON_Complex64_t
beta
,
const
CHAM_desc_t
*
B
,
int
Bm
,
int
Bn
)
{
if
(
alpha
==
0
.
)
{
INSERT_TASK_zlascal
(
options
,
uplo
,
m
,
n
,
nb
,
beta
,
B
,
Bm
,
Bn
);
return
;
}
INSERT_TASK_COMMON_PARAMETERS
(
ztradd
,
2
);
int
accessB
;
/* Reduce the B access if needed */
accessB
=
(
beta
==
0
.
)
?
STARPU_W
:
STARPU_RW
;
/*
* Set the data handles and initialize exchanges if needed
*/
starpu_cham_exchange_init_params
(
options
,
&
params
,
B
->
get_rankof
(
B
,
Bm
,
Bn
)
);
starpu_cham_exchange_data_before_execution
(
options
,
params
,
&
nbdata
,
descrs
,
A
,
Am
,
An
,
STARPU_R
);
starpu_cham_exchange_data_before_execution
(
options
,
params
,
&
nbdata
,
descrs
,
B
,
Bm
,
Bn
,
accessB
);
/*
* Not involved, let's return
*/
if
(
nbdata
==
0
)
{
return
;
}
if
(
params
.
do_execute
)
{
int
ret
;
struct
starpu_task
*
task
=
starpu_task_create
();
task
->
cl
=
cl
;
/* Set codelet parameters */
clargs
=
malloc
(
sizeof
(
struct
cl_ztradd_args_s
)
);
clargs
->
uplo
=
uplo
;
clargs
->
trans
=
trans
;
clargs
->
m
=
m
;
clargs
->
n
=
n
;
clargs
->
alpha
=
alpha
;
clargs
->
beta
=
beta
;
task
->
cl_arg
=
clargs
;
task
->
cl_arg_size
=
sizeof
(
struct
cl_ztradd_args_s
);
task
->
cl_arg_free
=
1
;
/* Set common parameters */
starpu_cham_task_set_options
(
options
,
task
,
nbdata
,
descrs
,
cl_ztradd_callback
);
/* Flops */
//task->flops = flops_ztradd( m, n );
/* Refine name */
task
->
name
=
chameleon_codelet_name
(
cl_name
,
2
,
A
->
get_blktile
(
A
,
Am
,
An
),
B
->
get_blktile
(
B
,
Bm
,
Bn
)
);
ret
=
starpu_task_submit
(
task
);
if
(
ret
==
-
ENODEV
)
{
task
->
destroy
=
0
;
starpu_task_destroy
(
task
);
chameleon_error
(
"INSERT_TASK_ztradd"
,
"Failed to submit the task to StarPU"
);
return
;
}
}
starpu_cham_task_exchange_data_after_execution
(
options
,
params
,
nbdata
,
descrs
);
(
void
)
nb
;
}
#endif
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