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
514b2d1c
"include/vscode:/vscode.git/clone" did not exist on "f4ea00fc631e60b0b7abb1d0c454c51d0c6a2ecf"
Commit
514b2d1c
authored
Apr 06, 2021
by
Jing Zhang
Browse files
improved verify
parent
6a4db056
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
driver/include/host_conv.hpp
driver/include/host_conv.hpp
+2
-1
driver/src/conv_driver.cpp
driver/src/conv_driver.cpp
+5
-6
No files found.
driver/include/host_conv.hpp
View file @
514b2d1c
...
...
@@ -10,6 +10,7 @@ template <class TIn,
class
UpperPads
>
void
host_direct_convolution
(
const
Tensor
<
TIn
>&
in_nchw
,
const
Tensor
<
TWei
>&
wei_kcyx
,
const
Tensor
<
TOut
>&
add_nkhw
,
Tensor
<
TOut
>&
out_nkhw
,
ConvStrides
,
ConvDilations
,
...
...
@@ -40,7 +41,7 @@ void host_direct_convolution(const Tensor<TIn>& in_nchw,
}
}
}
out_nkhw
(
n
,
k
,
ho
,
wo
)
+
=
v
;
out_nkhw
(
n
,
k
,
ho
,
wo
)
=
v
+
add_nkhw
(
n
,
k
,
ho
,
wo
)
;
};
auto
f_par
=
make_ParallelTensorFunctor
(
f
,
...
...
driver/src/conv_driver.cpp
View file @
514b2d1c
...
...
@@ -656,7 +656,7 @@ int main(int argc, char* argv[])
Tensor
<
in_data_t
>
wei_kcyx
(
make_HostTensorDescriptor
(
wei_kcyx_desc
));
Tensor
<
out_data_t
>
out_nkhw_host
(
make_HostTensorDescriptor
(
out_nkhw_desc
));
Tensor
<
out_data_t
>
add_nkhw
_device
(
make_HostTensorDescriptor
(
out_nkhw_desc
));
Tensor
<
out_data_t
>
add_nkhw
(
make_HostTensorDescriptor
(
out_nkhw_desc
));
Tensor
<
out_data_t
>
out_nkhw_device
(
make_HostTensorDescriptor
(
out_nkhw_desc
));
std
::
size_t
num_thread
=
std
::
thread
::
hardware_concurrency
();
...
...
@@ -693,9 +693,7 @@ int main(int argc, char* argv[])
};
wei_kcyx
.
GenerateTensorValue
(
gen_wei
,
num_thread
);
#endif
out_nkhw_host
.
GenerateTensorValue
(
GeneratorTensor_1
{},
num_thread
);
add_nkhw_device
.
GenerateTensorValue
(
GeneratorTensor_1
{},
num_thread
);
add_nkhw
.
GenerateTensorValue
(
GeneratorTensor_2
{
-
1
,
1
},
num_thread
);
}
#if 0
...
...
@@ -778,7 +776,7 @@ int main(int argc, char* argv[])
wei_kcyx_desc
,
wei_kcyx
,
out_nkhw_desc
,
add_nkhw
_device
,
add_nkhw
,
out_nkhw_device
,
ConvStrides
{},
ConvDilations
{},
...
...
@@ -791,6 +789,7 @@ int main(int argc, char* argv[])
{
host_direct_convolution
(
in_nchw
,
wei_kcyx
,
add_nkhw
,
out_nkhw_host
,
ConvStrides
{},
ConvDilations
{},
...
...
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