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
50590d59
Commit
50590d59
authored
1 year ago
by
Mathieu Faverge
Browse files
Options
Downloads
Patches
Plain Diff
descriptor: protect datatype from mixed flag
parent
97288236
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!395
Introduce half-precision conversion and gemm kernels for GPUs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
control/descriptor.c
+13
-8
13 additions, 8 deletions
control/descriptor.c
with
13 additions
and
8 deletions
control/descriptor.c
+
13
−
8
View file @
50590d59
...
...
@@ -91,6 +91,7 @@ int chameleon_desc_mat_free( CHAM_desc_t *desc )
void
chameleon_desc_init_tiles
(
CHAM_desc_t
*
desc
,
blkrankof_fct_t
rankof
)
{
CHAM_tile_t
*
tile
;
int8_t
flttype
=
cham_get_flttype
(
desc
->
dtyp
);
int
ii
,
jj
;
assert
(
rankof
!=
chameleon_getrankof_tile
);
...
...
@@ -101,7 +102,7 @@ void chameleon_desc_init_tiles( CHAM_desc_t *desc, blkrankof_fct_t rankof )
for
(
ii
=
0
;
ii
<
desc
->
lmt
;
ii
++
,
tile
++
)
{
int
rank
=
rankof
(
desc
,
ii
,
jj
);
tile
->
format
=
CHAMELEON_TILE_FULLRANK
;
tile
->
flttype
=
(
int8_t
)(
desc
->
d
typ
)
;
tile
->
flttype
=
flt
typ
e
;
tile
->
rank
=
rank
;
tile
->
m
=
ii
==
desc
->
lmt
-
1
?
desc
->
lm
-
ii
*
desc
->
mb
:
desc
->
mb
;
tile
->
n
=
jj
==
desc
->
lnt
-
1
?
desc
->
ln
-
jj
*
desc
->
nb
:
desc
->
nb
;
...
...
@@ -368,6 +369,8 @@ void chameleon_desc_destroy( CHAM_desc_t *desc )
*/
int
chameleon_desc_check
(
const
CHAM_desc_t
*
desc
)
{
cham_flttype_t
flttype
;
if
(
desc
==
NULL
)
{
chameleon_error
(
"chameleon_desc_check"
,
"NULL descriptor"
);
return
CHAMELEON_ERR_NOT_INITIALIZED
;
...
...
@@ -376,13 +379,15 @@ int chameleon_desc_check(const CHAM_desc_t *desc)
chameleon_error
(
"chameleon_desc_check"
,
"NULL matrix pointer"
);
return
CHAMELEON_ERR_UNALLOCATED
;
}
if
(
(
desc
->
dtyp
!=
ChamInteger
)
&&
(
desc
->
dtyp
!=
ChamRealHalf
)
&&
(
desc
->
dtyp
!=
ChamRealFloat
)
&&
(
desc
->
dtyp
!=
ChamRealDouble
)
&&
(
desc
->
dtyp
!=
ChamComplexHalf
)
&&
(
desc
->
dtyp
!=
ChamComplexFloat
)
&&
(
desc
->
dtyp
!=
ChamComplexDouble
)
)
flttype
=
cham_get_flttype
(
desc
->
dtyp
);
if
(
(
flttype
!=
ChamInteger
)
&&
(
flttype
!=
ChamRealHalf
)
&&
(
flttype
!=
ChamRealFloat
)
&&
(
flttype
!=
ChamRealDouble
)
&&
(
flttype
!=
ChamComplexHalf
)
&&
(
flttype
!=
ChamComplexFloat
)
&&
(
flttype
!=
ChamComplexDouble
)
)
{
chameleon_error
(
"chameleon_desc_check"
,
"invalid matrix type"
);
return
CHAMELEON_ERR_ILLEGAL_VALUE
;
...
...
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