onnxruntime/js/common/lib
Yulong Wang 451c02543a
[js/webgpu] allow specify preferredLayout (#17756)
### Description
Allow WebGPU backend to specify `preferredLayout`. Default is NHWC.

```js
const options = {executionProviders: [{name:'webgpu', preferredLayout: 'NCHW'}]};
sess1 = await ort.InferenceSession.create('./mobilenetv2-12.onnx', options);
```

### Motivation and Context
- implement @qjia7's requirement for an easier way to do performance
comparison between NCHW vs NHWC.
- It's possible that NCHW does better on some models and NHWC on others.
So offer user the capability to switch.
2023-10-02 21:25:12 -07:00
..
backend-impl.ts
backend.ts
env-impl.ts
env.ts
index.ts
inference-session-impl.ts
inference-session.ts [js/webgpu] allow specify preferredLayout (#17756) 2023-10-02 21:25:12 -07:00
onnx-value.ts
tensor-conversion-impl.ts
tensor-conversion.ts
tensor-factory-impl.ts
tensor-factory.ts
tensor-impl-type-mapping.ts
tensor-impl.ts
tensor-utils-impl.ts
tensor-utils.ts
tensor.ts
training-session-impl.ts
training-session.ts
version.ts