Skip to content

RVV tests failing on qemu #9886

@fbarchard

Description

@fbarchard

The following tests build but fail when run on qemu internally:

bench:f16_raddstoreexpminusmax_bench FAILED in 1.8s
bench:rdminmax_bench FAILED in 2.3s
bench:rdsum2_bench FAILED in 1.0s
bench:rdsum_bench FAILED in 1.8s
bench:rminmax_bench FAILED in 2.4s
bench:rsum2_bench FAILED in 1.7s
bench:rsum_bench FAILED in 3.4s
bench:vbinary_bench FAILED in 1.3s
bench:vunary_bench FAILED in 1.2s
bench/operators:binary_bench FAILED in 1.5s
bench/operators:softmax_bench FAILED in 4.7s
bench/operators:unary_bench FAILED in 1.5s
bench/subgraph:mobilenet FAILED in 27.2s
test:f16_f32_vcvt_test FAILED in 1.0s
test:f16_gemm_minmax_test FAILED in 1.8s
test:f16_igemm_minmax_test FAILED in 1.6s
test:f16_qs8_vcvt_test FAILED in 0.9s
test:f16_qu8_vcvt_test FAILED in 0.8s
test:f16_raddstoreexpminusmax_test FAILED in 0.9s
test:f16_vabs_test FAILED in 0.8s
test:f16_vadd_test FAILED in 1.0s
test:f16_vaddc_test FAILED in 0.7s
test:f16_vapproxgelu_test FAILED in 1.0s
test:f16_vclamp_test FAILED in 5.3s
test:f16_vcos_test FAILED in 3.4s
test:f16_vdiv_test FAILED in 1.3s
test:f16_vdivc_test FAILED in 1.0s
test:f16_vexp_test FAILED in 0.7s
test:f16_vgelu_test FAILED in 1.2s
test:f16_vmax_test FAILED in 0.9s
test:f16_vmaxc_test FAILED in 3.2s
test:f16_vmin_test FAILED in 1.0s
test:f16_vminc_test FAILED in 1.3s
test:f16_vmul_test FAILED in 1.5s
test:f16_vmulc_test FAILED in 1.6s
test:f16_vneg_test FAILED in 2.6s
test:f16_vprelu_test FAILED in 2.2s
test:f16_vpreluc_test FAILED in 0.8s
test:f16_vrdivc_test FAILED in 0.8s
test:f16_vrpreluc_test FAILED in 1.2s
test:f16_vrsubc_test FAILED in 0.9s
test:f16_vsin_test FAILED in 1.6s
test:f16_vsqr_test FAILED in 1.3s
test:f16_vsqrdiff_test FAILED in 2.4s
test:f16_vsqrdiffc_test FAILED in 1.3s
test:f16_vsub_test FAILED in 1.2s
test:f16_vsubc_test FAILED in 1.1s
test:f32_f16_vcvt_test FAILED in 1.1s
test:fingerprint_test FAILED in 2.1s
test:packing_test FAILED in 1.9s
test:qd8_f16_qb4w_gemm_minmax_test FAILED in 0.8s
test:qd8_f16_qc2w_gemm_minmax_test FAILED in 1.2s
test:qd8_f16_qc4w_gemm_minmax_test FAILED in 0.9s
test:qd8_f16_qc8w_igemm_minmax_test FAILED in 1.2s
test:rdminmax_test FAILED in 2.4s
test:rminmax_test FAILED in 0.8s
test:rsum2_test FAILED in 0.9s
test:rsum_test FAILED in 1.2s
test:x16_packw_test FAILED in 0.8s
test/operators:convert_nc_test FAILED in 1.4s
test/operators:dynamic_fully_connected_nc_test FAILED in 1.1s
test/operators:fully_connected_nc_test FAILED in 2.5s
test/operators:resize_bilinear_nchw_test FAILED in 0.8s
test/operators:resize_bilinear_nhwc_test FAILED in 2.1s
test/operators:rope_nthc_test FAILED in 1.2s
test/operators:softmax_nc_test FAILED in 0.9s
test/operators:unary_elementwise_nc_test FAILED in 1.2s
test/simd:f16_simd_scalar_test FAILED in 0.9s
test/subgraph:average_pooling_2d_test FAILED in 1.7s
test/subgraph:binary_test FAILED in 2.1s
test/subgraph:broadcast_test FAILED in 4.7s
test/subgraph:concatenate_test FAILED in 2.2s
test/subgraph:convolution_2d_test FAILED in 6.8s
test/subgraph:copy_test FAILED in 4.7s
test/subgraph:deconvolution_2d_test FAILED in 3.8s
test/subgraph:depth_to_space_2d_test FAILED in 3.1s
test/subgraph:depthwise_convolution_2d_test FAILED in 4.9s
test/subgraph:even_split_test FAILED in 4.2s
test/subgraph:fully_connected_test FAILED in 5.1s
test/subgraph:input_output_test FAILED in 0.8s
test/subgraph:max_pooling_2d_test FAILED in 3.2s
test/subgraph:softmax_test FAILED in 0.9s
test/subgraph:space_to_depth_2d_test FAILED in 2.8s
test/subgraph:split_fuse_test FAILED in 4.0s
test/subgraph:static_constant_pad_test FAILED in 3.6s
test/subgraph:static_expand_dims_test FAILED in 3.2s
test/subgraph:static_reshape_test FAILED in 3.8s
test/subgraph:static_slice_test FAILED in 7.4s
test/subgraph:subgraph_fp16_test FAILED in 1.1s
test/subgraph:unary_test FAILED in 2.3s
test:qd8_f16_qc8w_gemm_minmax_test FAILED in 5 out of 5 in 2.3s
test:rdsum2_test FAILED in 5 out of 5 in 4.6s
test:rdsum_test FAILED in 5 out of 5 in 1.9s
test/operators:average_pooling_nhwc_test FAILED in 5 out of 5 in 4.4s
test/operators:batch_matrix_multiply_nc_test FAILED in 5 out of 5 in 19.7s
test/operators:reduce_nd_test FAILED in 5 out of 5 in 2.7s
test/operators:transpose_nd_eager_test FAILED in 5 out of 5 in 4.7s
test/subgraph:batch_matrix_multiply_test FAILED in 4 out of 5 in 3.4s
test/subgraph:static_reduce_test FAILED in 5 out of 5 in 3.7s
test/subgraph:static_transpose_test FAILED in 5 out of 5 in 2.9s
test/operators:binary_elementwise_nd_test FAILED in 10 out of 10 in 3.8s
test/operators:convolution_nchw_test FAILED in 10 out of 10 in 4.0s
test/operators:convolution_nhwc_test FAILED in 10 out of 10 in 3.9s
test/operators:deconvolution_nhwc_test FAILED in 10 out of 10 in 6.2s
test/operators:max_pooling_nhwc_test FAILED in 10 out of 10 in 11.1s
test/operators:transpose_nd_test FAILED in 7 out of 10 in 5.2s

Most likely the issue is fp16 which is supposed to work, but does not on our sifives x280 emulator.

in hardware config the fp16 was disabled by default
with this at line 295:
/* There is no HWCAP for fp16 so disable by default */
set_arch_flag(xnn_arch_riscv_vector_fp16_arith, false);

On Feb 13 it was enabled with #9516
/* cpuinfo does not yet support risc-v isa extensions, so enable fp16 if compiled */
//set_arch_flag(xnn_arch_riscv_vector_fp16_arith, cpuinfo_has_riscv_zvfh());
#if XNN_ENABLE_RISCV_FP16_VECTOR
set_arch_flag(xnn_arch_riscv_vector_fp16_arith, use_riscv_vector);
#endif

which is enabled in bazel and cmake by default
) + xnnpack_select_if(
"//third_party/XNNPACK:riscv_fp16_vector_enabled
["XNN_ENABLE_RISCV_FP16_VECTOR=1"],
["XNN_ENABLE_RISCV_FP16_VECTOR=0"],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions