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
a8747955
"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "86c5f995e2554ba6af5dbbfd87eadbcfcb96dfd1"
Commit
a8747955
authored
Sep 22, 2023
by
Bartlomiej Wroblewski
Browse files
Reference contraction: Fix incorrect order of B matrix dimensions
parent
a1d9285f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
library/include/ck/library/reference_tensor_operation/cpu/reference_contraction.hpp
.../reference_tensor_operation/cpu/reference_contraction.hpp
+6
-6
No files found.
library/include/ck/library/reference_tensor_operation/cpu/reference_contraction.hpp
View file @
a8747955
...
@@ -32,12 +32,12 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
...
@@ -32,12 +32,12 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
struct
Argument
:
public
ck
::
tensor_operation
::
device
::
BaseArgument
struct
Argument
:
public
ck
::
tensor_operation
::
device
::
BaseArgument
{
{
Argument
(
const
Tensor
<
ADataType
>&
a_ms_ks
,
Argument
(
const
Tensor
<
ADataType
>&
a_ms_ks
,
const
Tensor
<
BDataType
>&
b_
n
s_
k
s
,
const
Tensor
<
BDataType
>&
b_
k
s_
n
s
,
Tensor
<
CDataType
>&
c_ms_ns
,
Tensor
<
CDataType
>&
c_ms_ns
,
AElementwiseOperation
a_element_op
,
AElementwiseOperation
a_element_op
,
BElementwiseOperation
b_element_op
)
BElementwiseOperation
b_element_op
)
:
a_ms_ks_
{
a_ms_ks
},
:
a_ms_ks_
{
a_ms_ks
},
b_
n
s_
k
s_
{
b_
n
s_
k
s
},
b_
k
s_
n
s_
{
b_
k
s_
n
s
},
c_ms_ns_
{
c_ms_ns
},
c_ms_ns_
{
c_ms_ns
},
a_element_op_
{
a_element_op
},
a_element_op_
{
a_element_op
},
b_element_op_
{
b_element_op
}
b_element_op_
{
b_element_op
}
...
@@ -45,7 +45,7 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
...
@@ -45,7 +45,7 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
}
}
const
Tensor
<
ADataType
>&
a_ms_ks_
;
const
Tensor
<
ADataType
>&
a_ms_ks_
;
const
Tensor
<
BDataType
>&
b_
n
s_
k
s_
;
const
Tensor
<
BDataType
>&
b_
k
s_
n
s_
;
Tensor
<
CDataType
>&
c_ms_ns_
;
Tensor
<
CDataType
>&
c_ms_ns_
;
AElementwiseOperation
a_element_op_
;
AElementwiseOperation
a_element_op_
;
...
@@ -75,7 +75,7 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
...
@@ -75,7 +75,7 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
arg
.
a_element_op_
(
arg
.
a_element_op_
(
v_a
,
ck
::
type_convert
<
AccDataType
>
(
arg
.
a_ms_ks_
(
m0
,
m1
,
k0
,
k1
)));
v_a
,
ck
::
type_convert
<
AccDataType
>
(
arg
.
a_ms_ks_
(
m0
,
m1
,
k0
,
k1
)));
arg
.
b_element_op_
(
arg
.
b_element_op_
(
v_b
,
ck
::
type_convert
<
AccDataType
>
(
arg
.
b_
n
s_
k
s_
(
n
0
,
n
1
,
k
0
,
k
1
)));
v_b
,
ck
::
type_convert
<
AccDataType
>
(
arg
.
b_
k
s_
n
s_
(
k
0
,
k
1
,
n
0
,
n
1
)));
v_acc
+=
v_a
*
v_b
;
v_acc
+=
v_a
*
v_b
;
}
}
...
@@ -113,12 +113,12 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
...
@@ -113,12 +113,12 @@ struct ReferenceContraction_M2_N2_K2 : public ck::tensor_operation::device::Base
}
}
static
auto
MakeArgument
(
const
Tensor
<
ADataType
>&
a_ms_ks
,
static
auto
MakeArgument
(
const
Tensor
<
ADataType
>&
a_ms_ks
,
const
Tensor
<
BDataType
>&
b_
n
s_
k
s
,
const
Tensor
<
BDataType
>&
b_
k
s_
n
s
,
Tensor
<
CDataType
>&
c_ms_ns
,
Tensor
<
CDataType
>&
c_ms_ns
,
AElementwiseOperation
a_element_op
,
AElementwiseOperation
a_element_op
,
BElementwiseOperation
b_element_op
)
BElementwiseOperation
b_element_op
)
{
{
return
Argument
{
a_ms_ks
,
b_
n
s_
k
s
,
c_ms_ns
,
a_element_op
,
b_element_op
};
return
Argument
{
a_ms_ks
,
b_
k
s_
n
s
,
c_ms_ns
,
a_element_op
,
b_element_op
};
}
}
static
auto
MakeInvoker
()
{
return
Invoker
{};
}
static
auto
MakeInvoker
()
{
return
Invoker
{};
}
...
...
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