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
1ada7d4d
Verified
Commit
1ada7d4d
authored
1 year ago
by
Jean-Marc Valin
Browse files
Options
Downloads
Patches
Plain Diff
Vectorizing sgemv for multiples of 4 with SSE
parent
166a6c8e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#4172
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dnn/vec_avx.h
+17
-0
17 additions, 0 deletions
dnn/vec_avx.h
with
17 additions
and
0 deletions
dnn/vec_avx.h
+
17
−
0
View file @
1ada7d4d
...
...
@@ -709,6 +709,23 @@ static inline void sgemv(float *out, const float *weights, int rows, int cols, i
}
_mm256_storeu_ps
(
&
y
[
0
],
vy0
);
}
for
(;
i
<
rows
-
3
;
i
+=
4
)
{
float
*
y
;
__m128
vy0
;
y
=
&
out
[
i
];
vy0
=
_mm_setzero_ps
();
for
(
j
=
0
;
j
<
cols
;
j
++
)
{
__m128
vxj
;
__m128
vw
;
vxj
=
_mm_broadcast_ss
(
&
x
[
j
]);
vw
=
_mm_loadu_ps
(
&
weights
[
j
*
col_stride
+
i
]);
vy0
=
_mm_fmadd_ps
(
vw
,
vxj
,
vy0
);
}
_mm_storeu_ps
(
&
y
[
0
],
vy0
);
}
for
(;
i
<
rows
;
i
++
)
{
out
[
i
]
=
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