Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
Opus
Commits
be5f58d6
Unverified
Commit
be5f58d6
authored
1 year ago
by
Jan Buethe
Browse files
Options
Downloads
Patches
Plain Diff
neon related alignment requirement warning fix
parent
cfc118d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!89
neon related alignment requirement warning fix
Pipeline
#3971
passed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dnn/vec_neon.h
+6
-4
6 additions, 4 deletions
dnn/vec_neon.h
with
6 additions
and
4 deletions
dnn/vec_neon.h
+
6
−
4
View file @
be5f58d6
...
...
@@ -320,7 +320,8 @@ static inline int32x4_t vdotprod(int32x4_t acc, int8x16_t a, int8x16_t b)
static
inline
void
cgemv8x4
(
float
*
_out
,
const
opus_int8
*
w
,
const
float
*
scale
,
int
rows
,
int
cols
,
const
float
*
_x
)
{
int
i
,
j
;
opus_int8
x
[
MAX_INPUTS
];
opus_int32
x_int
[
MAX_INPUTS
/
4
];
opus_int8
*
x
=
(
opus_int8
*
)
x_int
;
const
float32x4_t
const127
=
vdupq_n_f32
(
127
.);
for
(
i
=
0
;
i
<
cols
;
i
+=
8
)
{
int32x4_t
xi0
,
xi4
;
...
...
@@ -338,7 +339,7 @@ static inline void cgemv8x4(float *_out, const opus_int8 *w, const float *scale,
for
(
j
=
0
;
j
<
cols
;
j
+=
4
)
{
int8x16_t
vw0
,
vw1
,
vx
;
vx
=
(
int8x16_t
)
vld1q_dup_s32
((
int
*
)
&
x
[
j
]);
vx
=
(
int8x16_t
)
vld1q_dup_s32
((
int
*
)
(
void
*
)
&
x
[
j
]);
vw0
=
vld1q_s8
(
w
);
vw1
=
vld1q_s8
(
&
w
[
16
]);
acc0
=
vdotprod
(
acc0
,
vw0
,
vx
);
...
...
@@ -353,7 +354,8 @@ static inline void cgemv8x4(float *_out, const opus_int8 *w, const float *scale,
static
inline
void
sparse_cgemv8x4
(
float
*
_out
,
const
opus_int8
*
w
,
const
int
*
idx
,
const
float
*
scale
,
int
rows
,
int
cols
,
const
float
*
_x
)
{
int
i
,
j
;
opus_int8
x
[
MAX_INPUTS
];
opus_int32
x_int
[
MAX_INPUTS
/
4
];
opus_int8
*
x
=
(
opus_int8
*
)
x_int
;
const
float32x4_t
const127
=
vdupq_n_f32
(
127
.);
for
(
i
=
0
;
i
<
cols
;
i
+=
8
)
{
int32x4_t
xi0
,
xi4
;
...
...
@@ -375,7 +377,7 @@ static inline void sparse_cgemv8x4(float *_out, const opus_int8 *w, const int *i
int
pos
;
pos
=
(
*
idx
++
);
int8x16_t
vw0
,
vw1
,
vx
;
vx
=
(
int8x16_t
)
vld1q_dup_s32
((
int
*
)
&
x
[
pos
]);
vx
=
(
int8x16_t
)
vld1q_dup_s32
((
int
*
)
(
void
*
)
&
x
[
pos
]);
vw0
=
vld1q_s8
(
w
);
vw1
=
vld1q_s8
(
&
w
[
16
]);
acc0
=
vdotprod
(
acc0
,
vw0
,
vx
);
...
...
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