Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
composable_kernel
Commits
a21b0d27
Commit
a21b0d27
authored
Nov 20, 2018
by
Chao Liu
Browse files
refactor
parent
6790b8f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
50 deletions
+50
-50
driver/conv.cu
driver/conv.cu
+1
-1
driver/device_direct_convolution_1.cuh
driver/device_direct_convolution_1.cuh
+17
-17
driver/device_direct_convolution_2.cuh
driver/device_direct_convolution_2.cuh
+20
-20
src/include/gridwise_direct_convolution_1.cuh
src/include/gridwise_direct_convolution_1.cuh
+6
-6
src/include/gridwise_direct_convolution_2.cuh
src/include/gridwise_direct_convolution_2.cuh
+6
-6
No files found.
driver/conv.cu
View file @
a21b0d27
...
...
@@ -178,7 +178,7 @@ int main()
for
(
int
i
=
0
;
i
<
20
;
++
i
)
{
device_direct_convolution_
2
(
in_desc
,
in
,
wei_desc
,
wei
,
out_desc
,
out_device
);
device_direct_convolution_
1
(
in_desc
,
in
,
wei_desc
,
wei
,
out_desc
,
out_device
);
}
#if 0
...
...
driver/device_direct_convolution_1.cuh
View file @
a21b0d27
...
...
@@ -55,23 +55,23 @@ void device_direct_convolution_1(
cudaEventCreate
(
&
start
);
cudaEventRecord
(
start
,
0
);
gridwise_convolution
<
T
,
InDesc
,
WeiDesc
,
OutDesc
,
OutTileSizeH
,
OutTileSizeW
,
NPerBlock
,
KPerBlock
,
CPerBlock
,
YPerBlock
,
XPerBlock
,
NBlockOpLen0
,
NBlockOpLen1
,
NBlockOpLen2
,
NBlockOpLen3
,
BlockSize
,
GridSize
>
gridwise_
direct_
convolution
_1
<
T
,
InDesc
,
WeiDesc
,
OutDesc
,
OutTileSizeH
,
OutTileSizeW
,
NPerBlock
,
KPerBlock
,
CPerBlock
,
YPerBlock
,
XPerBlock
,
NBlockOpLen0
,
NBlockOpLen1
,
NBlockOpLen2
,
NBlockOpLen3
,
BlockSize
,
GridSize
>
<<<
grid_dim
,
block_dim
>>>
(
InDesc
{},
static_cast
<
T
*>
(
in_device_buf
.
GetDeviceBuffer
()),
WeiDesc
{},
...
...
driver/device_direct_convolution_2.cuh
View file @
a21b0d27
...
...
@@ -59,26 +59,26 @@ void device_direct_convolution_2(
cudaEventCreate
(
&
start
);
cudaEventRecord
(
start
,
0
);
gridwise_convolution
<
T
,
InDesc
,
WeiDesc
,
OutDesc
,
OutTileSizeH
,
OutTileSizeW
,
NPerBlock
,
KPerBlock
,
CPerBlock
,
YPerBlock
,
XPerBlock
,
NPerThread
,
KPerThread
,
CPerThread
,
NBlockOpLen0
,
NBlockOpLen1
,
NBlockOpLen2
,
NBlockOpLen3
,
BlockSize
,
GridSize
>
gridwise_
direct_
convolution
_2
<
T
,
InDesc
,
WeiDesc
,
OutDesc
,
OutTileSizeH
,
OutTileSizeW
,
NPerBlock
,
KPerBlock
,
CPerBlock
,
YPerBlock
,
XPerBlock
,
NPerThread
,
KPerThread
,
CPerThread
,
NBlockOpLen0
,
NBlockOpLen1
,
NBlockOpLen2
,
NBlockOpLen3
,
BlockSize
,
GridSize
>
<<<
grid_dim
,
block_dim
>>>
(
InDesc
{},
static_cast
<
T
*>
(
in_device_buf
.
GetDeviceBuffer
()),
WeiDesc
{},
...
...
src/include/gridwise_direct_convolution_1.cuh
View file @
a21b0d27
...
...
@@ -20,12 +20,12 @@ template <class TFloat,
unsigned
NBlockOpLen3
,
unsigned
BlockSize
,
unsigned
GridSize
>
__global__
void
gridwise_convolution
(
InGlobalDesc
,
TFloat
*
const
__restrict__
p_in_global
,
WeiGlobalDesc
,
TFloat
*
const
__restrict__
p_wei_global
,
OutGlobalDesc
,
TFloat
*
__restrict__
p_out_global
)
__global__
void
gridwise_
direct_
convolution
_1
(
InGlobalDesc
,
TFloat
*
const
__restrict__
p_in_global
,
WeiGlobalDesc
,
TFloat
*
const
__restrict__
p_wei_global
,
OutGlobalDesc
,
TFloat
*
__restrict__
p_out_global
)
{
constexpr
auto
I0
=
Index
<
0
>
{};
constexpr
auto
I1
=
Index
<
1
>
{};
...
...
src/include/gridwise_direct_convolution_2.cuh
View file @
a21b0d27
...
...
@@ -25,12 +25,12 @@ template <class TFloat,
unsigned
NBlockOpLen3
,
unsigned
BlockSize
,
unsigned
GridSize
>
__global__
void
gridwise_convolution
(
InGlobalDesc
,
TFloat
*
const
__restrict__
p_in_global
,
WeiGlobalDesc
,
TFloat
*
const
__restrict__
p_wei_global
,
OutGlobalDesc
,
TFloat
*
__restrict__
p_out_global
)
__global__
void
gridwise_
direct_
convolution
_2
(
InGlobalDesc
,
TFloat
*
const
__restrict__
p_in_global
,
WeiGlobalDesc
,
TFloat
*
const
__restrict__
p_wei_global
,
OutGlobalDesc
,
TFloat
*
__restrict__
p_out_global
)
{
constexpr
auto
I0
=
Index
<
0
>
{};
constexpr
auto
I1
=
Index
<
1
>
{};
...
...
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