mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-09 17:28:58 +00:00
[js/webgpu] fix 2 build breaks introduced in merge (#17273)
### Description fix 2 build breaks introduced in merge. Fixes web build
This commit is contained in:
parent
87bef1f3f2
commit
fb51faea64
2 changed files with 3 additions and 5 deletions
|
|
@ -1,13 +1,13 @@
|
|||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
import {DataType, tensorTypeToWsglType} from '../../../wasm-common';
|
||||
import {DataType} from '../../../wasm-common';
|
||||
import {TensorView} from '../../tensor';
|
||||
import {ShapeUtil} from '../../util';
|
||||
import {AttributeWithCacheKey, createAttributeWithCacheKey} from '../attribute-with-cache-key';
|
||||
import {ComputeContext, GpuDataType, ProgramInfo, ProgramInfoLoader, ProgramMetadata} from '../types';
|
||||
|
||||
import {ShaderHelper} from './common';
|
||||
import {ShaderHelper, tensorTypeToWsglStorageType} from './common';
|
||||
|
||||
export interface SkipLayerNormAttributes extends AttributeWithCacheKey {
|
||||
epsilon: number;
|
||||
|
|
@ -84,7 +84,7 @@ const createSkipLayerNormProgramInfo =
|
|||
const meanInvStdDevDim = isTraining ? inputShape.slice(0, -1).concat(1) : [];
|
||||
const hasBetaInput = inputs.length > 3;
|
||||
const hasBiasInput = inputs.length > 4;
|
||||
const dataType = tensorTypeToWsglType(inputs[0].dataType);
|
||||
const dataType = tensorTypeToWsglStorageType(inputs[0].dataType);
|
||||
const hasMeanOutput = isTraining && outputCount > 1;
|
||||
const hasInvStdDevOutput = isTraining && outputCount > 2;
|
||||
const hasInputSkipBiasSumOutput = outputCount > 3;
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ export const createTileProgramInfo =
|
|||
const getShaderSource = (shaderHelper: ShaderHelper) => `
|
||||
const inputShape = ${input.indices(...inputShape)};
|
||||
${shaderHelper.declareVariables(input, output)}
|
||||
${output.impl('offsetToIndices')}
|
||||
${input.impl('indicesToOffset', 'get')}
|
||||
${shaderHelper.mainStart()}
|
||||
${shaderHelper.guardAgainstOutOfBoundsWorkgroupSizes(outputSize)}
|
||||
let outputIndices = ${output.offsetToIndices('global_idx')};
|
||||
|
|
|
|||
Loading…
Reference in a new issue