onnxruntime/js/web/karma.conf.js
Ye Wang f202cf3280
First round cherry-pick to rel-1.9.0 (#9019)
* fast reduction for reducemean (#8976)

* Adding preprocessor checks for torch version during torch cpp extensions compilation (#8989)

* custom autograd func memory refinement  (#8993)

* Release torch tensor referenced by torch gradient graph (created in PythonOp)

* Update orttraining/orttraining/python/training/ortmodule/torch_cpp_extensions/torch_interop_utils/torch_interop_utils.cc

* refine with comments

Co-authored-by: Wei-Sheng Chin <wschin@outlook.com>

* Fix issues in TensorRT EP (#8996)

* fix big engine load issue and add cuda_cpu_alloc

* remove redundancy

* fix minor issues

* [js/web] fix karma launch with chrome headless (#8998)

* Update Nuget Packge Pipline to CUDA11.4 and TensorRT8 on Windows (#9000)

* Update to CUDA11.4 and TensorRT-8.0.3.4

* update trt pool, remove cudnn from setup_env_gpu.bat

* revert pool

* test gpu package pipeline on t4

* back out changes

* back out changes

Co-authored-by: George Wu <jywu@microsoft.com>

* Fix fuzz testing build blocking release. (#9008)

* add model local function support (#8540)

* updates for picking pnnx commit

* add tests filter to c# tests

* plus test fixes

* fix versioning for contrib ops

* fix tests

* test filter for optional ops

* more versioning related updates

* fix test

* fix layernorm spec

* more updates

* update docs

* add more test filters

* more filters

* update binary size threshold

* update docs

* draft - enable model local function

* enable model local functions in ORT

* update to latest rel onnx commit

* plus tests

* plus more updates

* plus updates

* test updates

* Fix for nested functions + shape inference

* plus bug fix and updates per review

* plus fixes per review

* plus test updates

* plus updates per review

* plus fixes

* fix a test

Co-authored-by: Vincent Wang <wangwchpku@outlook.com>
Co-authored-by: baijumeswani <bmeswani@microsoft.com>
Co-authored-by: pengwa <pengwa@microsoft.com>
Co-authored-by: Wei-Sheng Chin <wschin@outlook.com>
Co-authored-by: stevenlix <38092805+stevenlix@users.noreply.github.com>
Co-authored-by: Yulong Wang <yulongw@microsoft.com>
Co-authored-by: Chi Lo <54722500+chilo-ms@users.noreply.github.com>
Co-authored-by: George Wu <jywu@microsoft.com>
Co-authored-by: Pranav Sharma <prs@microsoft.com>
Co-authored-by: Ashwini Khade <askhade@microsoft.com>
2021-09-09 15:05:38 -07:00

170 lines
5.2 KiB
JavaScript

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
const bundleMode = require('minimist')(process.argv)['bundle-mode'] || 'dev'; // 'dev'|'perf'|undefined;
const karmaPlugins = require('minimist')(process.argv)['karma-plugins'] || undefined;
const timeoutMocha = require('minimist')(process.argv)['timeout-mocha'] || 60000;
const commonFile = bundleMode === 'dev' ? '../common/dist/ort-common.js' : '../common/dist/ort-common.min.js'
const mainFile = bundleMode === 'dev' ? 'test/ort.dev.js' : 'test/ort.perf.js';
// it's a known issue that Safari does not work with "localhost" in BrowserStack:
// https://www.browserstack.com/question/663
//
// we need to read machine IP address to replace "localhost":
// https://stackoverflow.com/a/8440736
//
function getMachineIpAddress() {
var os = require('os');
var ifaces = os.networkInterfaces();
for (const ifname in ifaces) {
for (const iface of ifaces[ifname]) {
if ('IPv4' !== iface.family || iface.internal !== false) {
// skip over internal (i.e. 127.0.0.1) and non-ipv4 addresses
continue;
}
// returns the first available IP address
return iface.address;
}
}
// if no available IP address, fallback to "localhost".
return 'localhost';
}
module.exports = function (config) {
config.set({
// global config of your BrowserStack account
browserStack: {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_ACCESS_KEY,
forceLocal: true,
startTunnel: true,
idleTimeout: '300',
},
frameworks: ['mocha'],
files: [
{ pattern: commonFile },
{ pattern: mainFile },
{ pattern: 'test/testdata-file-cache-*.json', included: false },
{ pattern: 'test/data/**/*', included: false, nocache: true },
{ pattern: 'dist/ort-wasm.wasm', included: false },
{ pattern: 'dist/ort-wasm-threaded.wasm', included: false },
{ pattern: 'dist/ort-wasm-simd.wasm', included: false },
{ pattern: 'dist/ort-wasm-simd-threaded.wasm', included: false },
{ pattern: 'dist/ort-wasm-threaded.worker.js', included: false },
],
proxies: {
'/base/test/ort-wasm.wasm': '/base/dist/ort-wasm.wasm',
'/base/test/ort-wasm-threaded.wasm': '/base/dist/ort-wasm-threaded.wasm',
'/base/test/ort-wasm-simd.wasm': '/base/dist/ort-wasm-simd.wasm',
'/base/test/ort-wasm-simd-threaded.wasm': '/base/dist/ort-wasm-simd-threaded.wasm',
'/base/test/ort-wasm-threaded.worker.js': '/base/dist/ort-wasm-threaded.worker.js',
},
plugins: karmaPlugins,
client: { captureConsole: true, mocha: { expose: ['body'], timeout: timeoutMocha } },
preprocessors: { mainFile: ['sourcemap'] },
reporters: ['mocha', 'BrowserStack'],
browsers: [],
captureTimeout: 120000,
reportSlowerThan: 100,
browserDisconnectTimeout: 600000,
browserNoActivityTimeout: 300000,
browserDisconnectTolerance: 0,
browserSocketTimeout: 60000,
hostname: getMachineIpAddress(),
customLaunchers: {
ChromeTest: { base: 'ChromeHeadless', flags: ['--window-size=1,1', '--enable-features=SharedArrayBuffer'] },
ChromeDebug: { debug: true, base: 'Chrome', flags: ['--remote-debugging-port=9333', '--enable-features=SharedArrayBuffer'] },
//
// ==== BrowserStack browsers ====
//
// Windows
//
BS_WIN_10_Chrome_91: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Chrome',
browser_version: '91'
},
BS_WIN_10_Edge_91: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Edge',
browser_version: '91'
},
BS_WIN_10_Firefox_89: {
base: 'BrowserStack',
os: 'Windows',
os_version: '10',
browser: 'Firefox',
browser_version: '89'
},
// macOS
//
BS_MAC_11_Safari_14: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Big Sur',
browser: 'Safari',
browser_version: '14.0'
},
BS_MAC_11_Chrome_91: {
base: 'BrowserStack',
os: 'OS X',
os_version: 'Big Sur',
browser: 'Chrome',
browser_version: '91'
},
// iPhone
//
BS_IOS_14_iPhoneXS: {
base: 'BrowserStack',
device: 'iPhone XS',
real_mobile: true,
os: 'ios',
os_version: '14'
},
BS_IOS_13_iPhoneXS: {
base: 'BrowserStack',
device: 'iPhone XS',
real_mobile: true,
os: 'ios',
os_version: '13'
},
// Android
//
BS_ANDROID_11_Pixel_5: {
base: 'BrowserStack',
device: 'Google Pixel 5',
real_mobile: true,
os: 'android',
os_version: '11.0'
},
BS_ANDROID_11_Galaxy_S_21: {
base: 'BrowserStack',
device: 'Samsung Galaxy S21',
real_mobile: true,
os: 'android',
os_version: '11.0'
},
BS_ANDROID_10_Pixel_4: {
base: 'BrowserStack',
device: 'Google Pixel 4',
real_mobile: true,
os: 'android',
os_version: '10.0'
}
}
});
};