From 6e7c17c44bd4dad90dc02a054953a13d46a4c0ab Mon Sep 17 00:00:00 2001 From: Uzlopak <5059100+Uzlopak@users.noreply.github.com> Date: Sat, 7 Sep 2024 00:15:54 +0000 Subject: [PATCH] chore: update WPT --- test/fixtures/wpt/interfaces/fenced-frame.idl | 9 - test/fixtures/wpt/interfaces/turtledove.idl | 7 +- test/fixtures/wpt/interfaces/webgpu.idl | 1 + test/fixtures/wpt/interfaces/webnn.idl | 339 ++++++++++++++++++ 4 files changed, 343 insertions(+), 13 deletions(-) diff --git a/test/fixtures/wpt/interfaces/fenced-frame.idl b/test/fixtures/wpt/interfaces/fenced-frame.idl index 2cc6313e4db..8c5fa31bea8 100644 --- a/test/fixtures/wpt/interfaces/fenced-frame.idl +++ b/test/fixtures/wpt/interfaces/fenced-frame.idl @@ -16,18 +16,9 @@ interface HTMLFencedFrameElement : HTMLElement { enum OpaqueProperty {"opaque"}; -typedef (unsigned long or OpaqueProperty) FencedFrameConfigSize; -typedef USVString FencedFrameConfigURL; - [Exposed=Window, Serializable] interface FencedFrameConfig { constructor(USVString url); - - readonly attribute FencedFrameConfigSize? containerWidth; - readonly attribute FencedFrameConfigSize? containerHeight; - readonly attribute FencedFrameConfigSize? contentWidth; - readonly attribute FencedFrameConfigSize? contentHeight; - undefined setSharedStorageContext(DOMString contextString); }; diff --git a/test/fixtures/wpt/interfaces/turtledove.idl b/test/fixtures/wpt/interfaces/turtledove.idl index ff177c6782f..77360d0dd10 100644 --- a/test/fixtures/wpt/interfaces/turtledove.idl +++ b/test/fixtures/wpt/interfaces/turtledove.idl @@ -16,6 +16,7 @@ dictionary AuctionAd { USVString buyerReportingId; USVString buyerAndSellerReportingId; sequence allowedReportingOrigins; + DOMString adRenderId; }; dictionary AuctionAdInterestGroupSize { @@ -239,10 +240,8 @@ partial interface HTMLIFrameElement { [CEReactions] attribute boolean adAuctionHeaders; }; -dictionary PreviousWin { - required long long timeDelta; - required DOMString adJSON; -}; +typedef (long long or AuctionAd) PreviousWinElement; +typedef sequence PreviousWin; dictionary BiddingBrowserSignals { required DOMString topWindowHostname; diff --git a/test/fixtures/wpt/interfaces/webgpu.idl b/test/fixtures/wpt/interfaces/webgpu.idl index 49186018a72..df82c2becd5 100644 --- a/test/fixtures/wpt/interfaces/webgpu.idl +++ b/test/fixtures/wpt/interfaces/webgpu.idl @@ -255,6 +255,7 @@ dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase { GPUTextureFormat format; GPUTextureViewDimension dimension; + GPUTextureUsageFlags usage = 0; GPUTextureAspect aspect = "all"; GPUIntegerCoordinate baseMipLevel = 0; GPUIntegerCoordinate mipLevelCount; diff --git a/test/fixtures/wpt/interfaces/webnn.idl b/test/fixtures/wpt/interfaces/webnn.idl index ef29aaeefda..f8db7b0d542 100644 --- a/test/fixtures/wpt/interfaces/webnn.idl +++ b/test/fixtures/wpt/interfaces/webnn.idl @@ -43,6 +43,30 @@ dictionary MLComputeResult { interface MLContext { Promise compute( MLGraph graph, MLNamedArrayBufferViews inputs, MLNamedArrayBufferViews outputs); + + MLOpSupportLimits opSupportLimits(); +}; + +dictionary MLOpSupportLimits { + MLInputOperandLayout preferredInputLayout; + MLSupportLimits input; + MLSupportLimits constant; + MLSupportLimits output; +}; + +dictionary MLSupportLimits { + sequence dataTypes; +}; + +dictionary MLBinarySupportLimits { + MLSupportLimits a; + MLSupportLimits b; + MLSupportLimits output; +}; + +dictionary MLSingleInputSupportLimits { + MLSupportLimits input; + MLSupportLimits output; }; [SecureContext, Exposed=(Window, DedicatedWorker)] @@ -113,6 +137,11 @@ partial interface MLGraphBuilder { optional MLArgMinMaxOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits argMin; + MLSingleInputSupportLimits argMax; +}; + dictionary MLBatchNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; @@ -125,12 +154,29 @@ partial interface MLGraphBuilder { optional MLBatchNormalizationOptions options = {}); }; +dictionary MLBatchNormalizationSupportLimits { + MLSupportLimits input; + MLSupportLimits mean; + MLSupportLimits variance; + MLSupportLimits scale; + MLSupportLimits bias; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLBatchNormalizationSupportLimits batchNormalization; +}; + partial interface MLGraphBuilder { MLOperand cast(MLOperand input, MLOperandDataType type, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits cast; +}; + dictionary MLClampOptions : MLOperatorOptions { MLNumber minValue; MLNumber maxValue; @@ -140,12 +186,25 @@ partial interface MLGraphBuilder { MLOperand clamp(MLOperand input, optional MLClampOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits clamp; +}; + partial interface MLGraphBuilder { MLOperand concat(sequence inputs, [EnforceRange] unsigned long axis, optional MLOperatorOptions options = {}); }; +dictionary MLConcatSupportLimits { + MLSupportLimits inputs; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLConcatSupportLimits concat; +}; + enum MLConv2dFilterOperandLayout { "oihw", "hwio", @@ -169,6 +228,17 @@ partial interface MLGraphBuilder { optional MLConv2dOptions options = {}); }; +dictionary MLConv2dSupportLimits { + MLSupportLimits input; + MLSupportLimits filter; + MLSupportLimits bias; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLConv2dSupportLimits conv2d; +}; + enum MLConvTranspose2dFilterOperandLayout { "iohw", "hwoi", @@ -192,6 +262,10 @@ partial interface MLGraphBuilder { optional MLConvTranspose2dOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLConv2dSupportLimits convTranspose2d; +}; + partial interface MLGraphBuilder { MLOperand add(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); MLOperand sub(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); @@ -202,6 +276,16 @@ partial interface MLGraphBuilder { MLOperand pow(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLBinarySupportLimits add; + MLBinarySupportLimits sub; + MLBinarySupportLimits mul; + MLBinarySupportLimits div; + MLBinarySupportLimits max; + MLBinarySupportLimits min; + MLBinarySupportLimits pow; +}; + partial interface MLGraphBuilder { MLOperand equal(MLOperand a, MLOperand b, @@ -221,6 +305,20 @@ partial interface MLGraphBuilder { MLOperand logicalNot(MLOperand a, optional MLOperatorOptions options = {}); }; +dictionary MLLogicalNotSupportLimits { + MLSupportLimits a; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLBinarySupportLimits equal; + MLBinarySupportLimits greater; + MLBinarySupportLimits greaterOrEqual; + MLBinarySupportLimits lesser; + MLBinarySupportLimits lesserOrEqual; + MLLogicalNotSupportLimits logicalNot; +}; + partial interface MLGraphBuilder { MLOperand abs(MLOperand input, optional MLOperatorOptions options = {}); MLOperand ceil(MLOperand input, optional MLOperatorOptions options = {}); @@ -237,6 +335,22 @@ partial interface MLGraphBuilder { MLOperand tan(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits abs; + MLSingleInputSupportLimits ceil; + MLSingleInputSupportLimits cos; + MLSingleInputSupportLimits erf; + MLSingleInputSupportLimits exp; + MLSingleInputSupportLimits floor; + MLSingleInputSupportLimits identity; + MLSingleInputSupportLimits log; + MLSingleInputSupportLimits neg; + MLSingleInputSupportLimits reciprocal; + MLSingleInputSupportLimits sin; + MLSingleInputSupportLimits sqrt; + MLSingleInputSupportLimits tan; +}; + dictionary MLEluOptions : MLOperatorOptions { double alpha = 1; }; @@ -245,12 +359,20 @@ partial interface MLGraphBuilder { MLOperand elu(MLOperand input, optional MLEluOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits elu; +}; + partial interface MLGraphBuilder { MLOperand expand(MLOperand input, sequence<[EnforceRange] unsigned long> newShape, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits expand; +}; + dictionary MLGatherOptions : MLOperatorOptions { [EnforceRange] unsigned long axis = 0; }; @@ -261,10 +383,24 @@ partial interface MLGraphBuilder { optional MLGatherOptions options = {}); }; +dictionary MLGatherSupportLimits { + MLSupportLimits input; + MLSupportLimits indices; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLGatherSupportLimits gather; +}; + partial interface MLGraphBuilder { MLOperand gelu(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits gelu; +}; + dictionary MLGemmOptions : MLOperatorOptions { MLOperand c; double alpha = 1.0; @@ -277,6 +413,17 @@ partial interface MLGraphBuilder { MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {}); }; +dictionary MLGemmSupportLimits { + MLSupportLimits a; + MLSupportLimits b; + MLSupportLimits c; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLGemmSupportLimits gemm; +}; + enum MLGruWeightLayout { "zrn", // update-reset-new gate ordering "rzn" // reset-update-new gate ordering @@ -314,6 +461,20 @@ partial interface MLGraphBuilder { optional MLGruOptions options = {}); }; +dictionary MLGruSupportLimits { + MLSupportLimits input; + MLSupportLimits weight; + MLSupportLimits recurrentWeight; + MLSupportLimits bias; + MLSupportLimits recurrentBias; + MLSupportLimits initialHiddenState; + MLSupportLimits outputs; +}; + +partial dictionary MLOpSupportLimits { + MLGruSupportLimits gru; +}; + dictionary MLGruCellOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; @@ -331,6 +492,20 @@ partial interface MLGraphBuilder { optional MLGruCellOptions options = {}); }; +dictionary MLGruCellSupportLimits { + MLSupportLimits input; + MLSupportLimits weight; + MLSupportLimits recurrentWeight; + MLSupportLimits hiddenState; + MLSupportLimits bias; + MLSupportLimits recurrentBias; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLGruCellSupportLimits gruCell; +}; + dictionary MLHardSigmoidOptions : MLOperatorOptions { double alpha = 0.2; double beta = 0.5; @@ -340,10 +515,18 @@ partial interface MLGraphBuilder { MLOperand hardSigmoid(MLOperand input, optional MLHardSigmoidOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits hardSigmoid; +}; + partial interface MLGraphBuilder { MLOperand hardSwish(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits hardSwish; +}; + dictionary MLInstanceNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; @@ -356,6 +539,17 @@ partial interface MLGraphBuilder { optional MLInstanceNormalizationOptions options = {}); }; +dictionary MLNormalizationSupportLimits { + MLSupportLimits input; + MLSupportLimits scale; + MLSupportLimits bias; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLNormalizationSupportLimits instanceNormalization; +}; + dictionary MLLayerNormalizationOptions : MLOperatorOptions { MLOperand scale; MLOperand bias; @@ -368,6 +562,10 @@ partial interface MLGraphBuilder { optional MLLayerNormalizationOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLNormalizationSupportLimits layerNormalization; +}; + dictionary MLLeakyReluOptions : MLOperatorOptions { double alpha = 0.01; }; @@ -376,6 +574,10 @@ partial interface MLGraphBuilder { MLOperand leakyRelu(MLOperand input, optional MLLeakyReluOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits leakyRelu; +}; + dictionary MLLinearOptions : MLOperatorOptions { double alpha = 1; double beta = 0; @@ -385,6 +587,10 @@ partial interface MLGraphBuilder { MLOperand linear(MLOperand input, optional MLLinearOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits linear; +}; + enum MLLstmWeightLayout { "iofg", // input-output-forget-cell gate ordering "ifgo" // input-forget-cell-output gate ordering @@ -411,6 +617,22 @@ partial interface MLGraphBuilder { optional MLLstmOptions options = {}); }; +dictionary MLLstmSupportLimits { + MLSupportLimits input; + MLSupportLimits weight; + MLSupportLimits recurrentWeight; + MLSupportLimits bias; + MLSupportLimits recurrentBias; + MLSupportLimits peepholeWeight; + MLSupportLimits initialHiddenState; + MLSupportLimits initialCellState; + MLSupportLimits outputs; +}; + +partial dictionary MLOpSupportLimits { + MLLstmSupportLimits lstm; +}; + dictionary MLLstmCellOptions : MLOperatorOptions { MLOperand bias; MLOperand recurrentBias; @@ -429,10 +651,30 @@ partial interface MLGraphBuilder { optional MLLstmCellOptions options = {}); }; +dictionary MLLstmCellSupportLimits { + MLSupportLimits input; + MLSupportLimits weight; + MLSupportLimits recurrentWeight; + MLSupportLimits hiddenState; + MLSupportLimits cellState; + MLSupportLimits bias; + MLSupportLimits recurrentBias; + MLSupportLimits peepholeWeight; + MLSupportLimits outputs; +}; + +partial dictionary MLOpSupportLimits { + MLLstmCellSupportLimits lstmCell; +}; + partial interface MLGraphBuilder { MLOperand matmul(MLOperand a, MLOperand b, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLBinarySupportLimits matmul; +}; + enum MLPaddingMode { "constant", "edge", @@ -452,6 +694,10 @@ partial interface MLGraphBuilder { optional MLPadOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits pad; +}; + enum MLRoundingType { "floor", "ceil" @@ -473,12 +719,28 @@ partial interface MLGraphBuilder { MLOperand maxPool2d(MLOperand input, optional MLPool2dOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits averagePool2d; + MLSingleInputSupportLimits l2Pool2d; + MLSingleInputSupportLimits maxPool2d; +}; + partial interface MLGraphBuilder { MLOperand prelu(MLOperand input, MLOperand slope, optional MLOperatorOptions options = {}); }; +dictionary MLPreluSupportLimits { + MLSupportLimits input; + MLSupportLimits slope; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLPreluSupportLimits prelu; +}; + dictionary MLReduceOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> axes; boolean keepDimensions = false; @@ -497,10 +759,27 @@ partial interface MLGraphBuilder { MLOperand reduceSumSquare(MLOperand input, optional MLReduceOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits reduceL1; + MLSingleInputSupportLimits reduceL2; + MLSingleInputSupportLimits reduceLogSum; + MLSingleInputSupportLimits reduceLogSumExp; + MLSingleInputSupportLimits reduceMax; + MLSingleInputSupportLimits reduceMean; + MLSingleInputSupportLimits reduceMin; + MLSingleInputSupportLimits reduceProduct; + MLSingleInputSupportLimits reduceSum; + MLSingleInputSupportLimits reduceSumSquare; +}; + partial interface MLGraphBuilder { MLOperand relu(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits relu; +}; + enum MLInterpolationMode { "nearest-neighbor", "linear" @@ -517,16 +796,28 @@ partial interface MLGraphBuilder { MLOperand resample2d(MLOperand input, optional MLResample2dOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits resample2d; +}; + partial interface MLGraphBuilder { MLOperand reshape(MLOperand input, sequence<[EnforceRange] unsigned long> newShape, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits reshape; +}; + partial interface MLGraphBuilder { MLOperand sigmoid(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits sigmoid; +}; + partial interface MLGraphBuilder { MLOperand slice(MLOperand input, sequence<[EnforceRange] unsigned long> starts, @@ -534,20 +825,36 @@ partial interface MLGraphBuilder { optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits slice; +}; + partial interface MLGraphBuilder { MLOperand softmax(MLOperand input, [EnforceRange] unsigned long axis, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits softmax; +}; + partial interface MLGraphBuilder { MLOperand softplus(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits softplus; +}; + partial interface MLGraphBuilder { MLOperand softsign(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits softsign; +}; + dictionary MLSplitOptions : MLOperatorOptions { [EnforceRange] unsigned long axis = 0; }; @@ -559,10 +866,23 @@ partial interface MLGraphBuilder { optional MLSplitOptions options = {}); }; +dictionary MLSplitSupportLimits { + MLSupportLimits input; + MLSupportLimits outputs; +}; + +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits split; +}; + partial interface MLGraphBuilder { MLOperand tanh(MLOperand input, optional MLOperatorOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits tanh; +}; + dictionary MLTransposeOptions : MLOperatorOptions { sequence<[EnforceRange] unsigned long> permutation; }; @@ -571,6 +891,10 @@ partial interface MLGraphBuilder { MLOperand transpose(MLOperand input, optional MLTransposeOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits transpose; +}; + dictionary MLTriangularOptions : MLOperatorOptions { boolean upper = true; [EnforceRange] long diagonal = 0; @@ -580,9 +904,24 @@ partial interface MLGraphBuilder { MLOperand triangular(MLOperand input, optional MLTriangularOptions options = {}); }; +partial dictionary MLOpSupportLimits { + MLSingleInputSupportLimits triangular; +}; + partial interface MLGraphBuilder { MLOperand where(MLOperand condition, MLOperand trueValue, MLOperand falseValue, optional MLOperatorOptions options = {}); }; + +dictionary MLWhereSupportLimits { + MLSupportLimits condition; + MLSupportLimits trueValue; + MLSupportLimits falseValue; + MLSupportLimits output; +}; + +partial dictionary MLOpSupportLimits { + MLWhereSupportLimits where; +};