Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
1385db48
Commit
1385db48
authored
Oct 01, 2018
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12711 from alalek:dnn_ocl_idlf_drop_weights_buf
parents
c9b6b2cf
0f031b66
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
conv_layer_spatial.cl
modules/dnn/src/opencl/conv_layer_spatial.cl
+3
-14
No files found.
modules/dnn/src/opencl/conv_layer_spatial.cl
View file @
1385db48
...
...
@@ -280,15 +280,6 @@ convolve_simd(
in_addr += INPUT_PITCH;
Dtype weight_buf[WEIGHT_PREF];
int w_idx=0;
for (int i = 0; i < WEIGHT_PREF; i++)
{
weight_buf[i] = weights[weight_addr];
weight_addr += SIMD_SIZE;
}
#define BLOCK_IN(n, c) intel_sub_group_shuffle(in_buf[n], (c))
int kr = 0; // kr = Kernel Row
...
...
@@ -297,20 +288,18 @@ convolve_simd(
int kc = 0; // kc = Kernel Column
LOOP(KERNEL_WIDTH, kc,
{
Dtype weight_value = weights[weight_addr];
weight_addr += SIMD_SIZE;
for (int br=0; br < OUT_BLOCK_HEIGHT; br++)
{
for(int bc=0; bc < OUT_BLOCK_WIDTH; bc++)
{
Dtype input = BLOCK_IN((br * STRIDE_Y + kr * DILATION_Y), bc * STRIDE_X + kc * DILATION_X);
out[br * OUT_BLOCK_WIDTH + bc] = mad(weight_
buf[w_idx % WEIGHT_PREF]
, input, out[br * OUT_BLOCK_WIDTH + bc]);
out[br * OUT_BLOCK_WIDTH + bc] = mad(weight_
value
, input, out[br * OUT_BLOCK_WIDTH + bc]);
}
}
weight_buf[w_idx % WEIGHT_PREF] = weights[weight_addr];
weight_addr += SIMD_SIZE;
++w_idx;
});
});
weight_addr -= WEIGHT_PREF * SIMD_SIZE;
}
fm = fm % ALIGNED_NUM_FILTERS;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment