File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed
Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -23,26 +23,10 @@ namespace oneDNN {
2323static inline void matmul (
2424 Tensor& result,
2525 const Tensor& mat1,
26- const Tensor& mat2_ ,
26+ const Tensor& mat2 ,
2727 const Tensor& b_raw,
2828 bool m2_trans,
2929 Attr attr) {
30- // FIXME: There is a onednn bug causes broadcast post fusion to be
31- // accuracy error when t2 is column major
32- Tensor mat2;
33- DeviceId curDevID;
34- dpcppGetDevice (&curDevID);
35- bool mat2_wa_flag =
36- (!Settings::I ().has_2d_block_array (curDevID)) && (mat2_.dim () == 2 );
37- if (mat2_wa_flag && m2_trans == false && mat2_.size (0 ) < 16 ) {
38- mat2 = mat2_.transpose (0 , 1 ).contiguous ();
39- m2_trans = true ;
40- } else if (mat2_wa_flag && m2_trans == true && mat2_.size (1 ) < 16 ) {
41- mat2 = mat2_.contiguous ();
42- } else {
43- mat2 = mat2_;
44- }
45-
4630 size_t dims = result.dim ();
4731 TORCH_CHECK (
4832 dims == 2 || dims == 3 ,
You can’t perform that action at this time.
0 commit comments