airockchip / rknn-toolkit2

Other
991 stars 104 forks source link

arm64 librknnrt.so(version 2.2), matmul result all zero #154

Open ishine opened 1 month ago

yuyun2000 commented 1 month ago

show code

happyme531 commented 3 weeks ago

相同问题

./build/rknn_matmul_api_demo 1 1,32,16 0 0
MatMul matmul_type = RKNN_FLOAT16_MM_FLOAT16_TO_FLOAT32, M = 1, K = 32, N = 16, B_layout = 0, AC_layout = 0, loop_count = 10, core_mask = 0, iommu_domain_id = 0
input/output matmul tensor attribute:
  name=A, dims=(1, 32), size=64, type=FP16
  name=B, dims=(32, 16), size=1024, type=FP16
  name=C, dims=(1, 16), size=64, type=FP32
Begin perf ...
   0: Elapse Time = 0.06ms, FPS = 16129.03
   1: Elapse Time = 0.03ms, FPS = 37037.04
   2: Elapse Time = 0.03ms, FPS = 38461.54
   3: Elapse Time = 0.03ms, FPS = 38461.54
   4: Elapse Time = 0.03ms, FPS = 40000.00
   5: Elapse Time = 0.03ms, FPS = 40000.00
   6: Elapse Time = 0.03ms, FPS = 38461.54
   7: Elapse Time = 0.03ms, FPS = 38461.54
   8: Elapse Time = 0.03ms, FPS = 40000.00
   9: Elapse Time = 0.03ms, FPS = 38461.54
Average Time = 0.03ms, Average FPS = 34482.76
matmul tensors:
  A(1, 32):
  0.65  0.01  0.43  0.82 -0.73 -0.92  0.27 -0.14 -0.43  0.28  0.57  0.81  0.75  0.19 -0.81  0.24  0.65 -0.67  0.16 -0.41  0.85  0.47 -0.06 -0.78  0.88  0.50  0.97  0.53  0.89  0.95 -0.81  0.54

  B(32, 16):
  0.65  0.01  0.43  0.82 -0.73 -0.92  0.27 -0.14 -0.43  0.28  0.57  0.81  0.75  0.19 -0.81  0.24
  0.65 -0.67  0.16 -0.41  0.85  0.47 -0.06 -0.78  0.88  0.50  0.97  0.53  0.89  0.95 -0.81  0.54
 -0.04  0.62  0.36  0.23  0.70 -0.37 -0.91 -0.74  0.92  0.66 -0.93  0.67 -0.15 -0.73 -0.09 -0.50
 -0.41 -0.93  0.10 -0.55  0.54 -0.96 -0.33  0.42  0.53 -0.37 -0.05  0.42 -0.42  0.14 -0.04  0.54
 -0.24 -0.68 -0.23 -0.54 -0.04 -0.13 -0.27 -0.13 -0.47 -0.20 -0.46  0.39  0.07  0.45  0.89  0.66
  0.52 -0.01 -0.89  0.06  0.02 -0.23 -0.52 -0.45  0.41  0.43  0.97  0.99 -0.43 -0.07  0.53  0.33
  0.25 -0.70  0.80 -0.79  0.17 -0.47  0.08  0.70  0.33  0.62  0.09 -0.61  0.07 -0.02 -0.94 -0.41
  0.97 -0.84  0.65 -0.01 -0.06 -0.87  0.55 -0.65  0.55  0.52 -0.67 -0.88 -0.55  0.86  0.45  0.70
 -0.84  0.25  0.91  0.33  0.78 -0.01  0.03  0.10 -0.38 -0.88  0.50  0.69  0.10  0.55 -0.72  0.07
  0.72  0.93 -0.94 -0.34 -0.94  0.61  0.00  0.61  0.12  0.33  0.73  0.57  0.19  0.18  0.28  0.35
 -0.57  0.19 -0.32 -0.79 -0.82  0.72  0.31 -0.20  0.84 -0.20 -0.51 -0.06 -0.64 -0.23 -0.99 -0.93
 -0.30 -0.93 -0.27 -0.24  0.68  0.73 -0.64 -0.20  0.06 -0.91 -0.63 -0.74  0.27  0.65  0.61  0.71
 -0.16 -0.71  0.91  0.02 -0.99  0.22  0.81  0.85 -0.98 -0.70 -0.21 -0.62  0.07 -0.20 -0.55  0.77
 -0.13  0.18 -0.48 -0.46 -0.09 -0.11  0.34  0.98 -0.02  0.72 -0.76 -0.75  0.37  0.84  0.96 -0.79
 -0.86  0.87  0.23 -0.85  0.09  0.04  0.99  0.11  0.34 -0.22  0.49 -0.59  0.58  0.95 -0.82 -0.56
  0.13 -0.30 -0.02 -0.95  0.59 -0.67 -0.98 -0.44 -0.96 -0.74 -0.18  0.41 -0.90 -0.23  0.62 -0.76
 -0.36 -0.16 -0.61  0.73  0.88 -0.62 -0.16  0.22  0.16 -0.66  0.64 -0.26 -0.71  0.81  0.18  0.42
 -0.49 -0.84  0.46 -0.90 -0.51  0.49 -0.34 -0.47  0.75  0.48  0.94  0.85 -0.75  0.56 -0.91 -0.11
 -0.60 -0.52 -0.38 -0.72 -0.14  0.47  0.50 -0.98  0.80  0.14 -0.25 -0.91 -0.05  0.93  0.51  0.46
 -0.90 -0.03  0.56 -0.41 -0.54 -0.78  0.12 -0.80  0.70  0.06 -0.94  0.95 -0.39 -0.85 -0.16  0.01
 -0.37  0.47  0.29  0.49 -0.07 -0.21  0.50 -0.26  0.93 -0.74 -0.18 -0.11 -0.81 -0.67 -0.65 -0.71
  0.30  0.91 -0.13  0.75 -0.86  0.99  0.96  0.84  0.05 -0.98  0.79  0.66 -0.83 -0.36 -0.33 -0.21
 -0.90  0.96 -0.72  0.04 -0.25  0.78  0.77 -0.31 -0.96 -0.40  0.57 -0.77 -0.07  0.92 -0.48 -0.78
  0.84  0.39  0.98  0.98  0.38  0.94  0.82 -0.57  0.95  0.61 -0.92 -0.88 -0.75 -0.25 -0.09 -0.65
 -0.29  0.19  0.39  0.46 -0.03  0.16 -0.85  0.01  0.76  0.72  0.24 -0.32  0.65  0.76 -0.09  0.49
  0.15 -0.12  0.46 -0.47 -0.18  0.28 -0.04 -0.23 -0.11  0.04 -0.11  0.13  0.79  0.80  0.49 -0.50
 -0.00 -0.12  0.97  0.97 -0.96 -0.88 -0.01  0.80  0.84 -0.77 -0.52  0.49  0.99  0.39 -0.02  0.14
 -0.73 -0.56  0.67  0.09  0.72 -0.37  0.87 -0.40  0.67 -0.24  0.74  0.46 -0.44  0.22  0.97  0.56
 -0.90  0.93  0.53 -0.86 -0.95 -0.49  0.93  0.89 -0.26 -0.58  0.38 -0.26  0.80 -0.64  0.88 -0.93
 -0.20  0.55  0.17 -0.49 -0.82  0.03  0.12  0.85  0.79 -0.15  0.31 -0.64 -0.92  0.27  0.91 -0.83
  0.21  0.44 -0.69  0.26  0.96 -0.75  0.15 -0.30 -0.34 -0.47  0.44 -0.53 -0.11  0.32 -0.46  0.69
 -0.13  0.71 -0.79  0.05 -0.26  0.32 -0.11 -0.47 -0.82 -0.80 -0.11 -0.75  0.48 -0.20 -0.57 -0.32

  C(1, 16):
  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00  0.00

FLOAT16_MM_FLOAT16_TO_FLOAT32 matmul result is wrong M x K x N is 1 32 16 AC_layout is 0 B_layout is 0

瑞芯微的NPU部门没有测试人员的吗???????????