mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
[js/webgpu] Support Chrome Canary in unit tests (#21750)
Chrome Canary is helpful to test some new features. With this PR, we can enable Chrome Canary in unit tests with command like "npm test -- op abs.jsonc -b=webgpu -e=chromecanary".
This commit is contained in:
parent
754dba2674
commit
f8efc086ce
2 changed files with 4 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ Examples:
|
|||
export declare namespace TestRunnerCliArgs {
|
||||
type Mode = 'suite0' | 'suite1' | 'model' | 'unittest' | 'op';
|
||||
type Backend = 'cpu' | 'webgl' | 'webgpu' | 'wasm' | 'onnxruntime' | 'webnn';
|
||||
type Environment = 'chrome' | 'edge' | 'firefox' | 'electron' | 'safari' | 'node' | 'bs';
|
||||
type Environment = 'chrome' | 'chromecanary' | 'edge' | 'firefox' | 'electron' | 'safari' | 'node' | 'bs';
|
||||
type BundleMode = 'dev' | 'perf';
|
||||
type IOBindingMode = 'none' | 'gpu-tensor' | 'gpu-location';
|
||||
}
|
||||
|
|
@ -385,7 +385,7 @@ export function parseTestRunnerCliArgs(cmdlineArgs: string[]): TestRunnerCliArgs
|
|||
// Option: -e=<...>, --env=<...>
|
||||
const envArg = args.env || args.e;
|
||||
const env = typeof envArg !== 'string' ? 'chrome' : envArg;
|
||||
if (['chrome', 'edge', 'firefox', 'electron', 'safari', 'node', 'bs'].indexOf(env) === -1) {
|
||||
if (['chrome', 'chromecanary', 'edge', 'firefox', 'electron', 'safari', 'node', 'bs'].indexOf(env) === -1) {
|
||||
throw new Error(`not supported env ${env}`);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -708,6 +708,8 @@ async function main() {
|
|||
switch (env) {
|
||||
case 'chrome':
|
||||
return 'ChromeTest';
|
||||
case 'chromecanary':
|
||||
return 'ChromeCanaryTest';
|
||||
case 'edge':
|
||||
return 'EdgeTest';
|
||||
case 'firefox':
|
||||
|
|
|
|||
Loading…
Reference in a new issue