onnxruntime/js/web/test
Yulong Wang 4385602386
[js/web] fix test runner with optional input/output (#20399)
### Description
fix test runner with optional input/output.

This change fixes the OP test runner (.jsonc format test) with optional
input(s) and/or output(s).

this fix reveals a problem of dealing with optional outputs:

> Take SkipSimplifiedLayerNorm as example: 
>
> if in the ONNX model, the node's outputs are: [ 'output_0', '' ]
instead of [ 'output_0' ], the current implementation will fail. The
difference is, in the first case, context.outputCount == 2, and then the
typescript implementation will try to create a tensor for output[1]. It
will eventually call to C++ function (OpKernelContext::Output), and the
output.DataRaw() will be nullptr. WebGPU backend will fail because it
cannot deal with a TensorView with data == 0.
>

This problem may need to be fixed or workaround in separated PR. This PR
does not fix this problem. Failed test cases are modified to work -
please note this PR does not break those test cases as they never work.
2024-04-22 12:53:10 -07:00
..
data/ops [js/web] fix test runner with optional input/output (#20399) 2024-04-22 12:53:10 -07:00
e2e [js] Make error friendly when isOrtFormat is undefined (#19958) 2024-03-27 02:07:00 -07:00
training/e2e [js/web/training] added end-to-end tests (#18700) 2024-01-12 13:33:33 -08:00
unittests [js/web] use ApiTensor insteadof onnxjs Tensor in TensorResultValidator (#19358) 2024-02-20 17:33:21 -08:00
op-test-schema.json [js/web] allow optional input/output in operator test (#17184) 2023-08-16 11:50:11 -07:00
suite-test-list.jsonc fix web ci: csum tests need fp64 which is not supported on webgpu (#20374) 2024-04-18 12:30:26 -07:00
test-main.ts [js/test] align web test runner flags with ort.env (#19790) 2024-03-13 12:00:36 -07:00
test-runner.ts [js/web] fix test runner with optional input/output (#20399) 2024-04-22 12:53:10 -07:00
test-shared.ts [js/web] workaround NPM test fetch failure (#20020) 2024-03-26 21:35:49 -07:00
test-types.ts [js/web] support external data in npm test (#19377) 2024-02-02 09:05:57 -08:00