Skip to content

Commit 6ec6b4b

Browse files
committed
PR feedback
* Removed exported jsepGetMLContext * Fixed check for ml-tensor and ml-location when creating an MLContext
1 parent e203298 commit 6ec6b4b

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

js/web/lib/wasm/wasm-types.ts

-6
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,6 @@ export declare namespace JSEP {
138138
* @returns
139139
*/
140140
jsepRegisterMLContext: (sessionId: number, context: MLContext) => void;
141-
/**
142-
* [exported from pre-jsep.js] Get MLContext for a session.
143-
* @param sessionId - specify the session ID.
144-
* @returns the MLContext.
145-
*/
146-
jsepGetMLContext: (sessionId: number) => MLContext;
147141
/**
148142
* [exported from pre-jsep.js] Reserve a MLBuffer ID attached to the current session.
149143
* @returns the MLBuffer ID.

js/web/test/test-runner.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export class ModelTestContext {
257257
const executionProviderConfig =
258258
modelTest.backend === 'webnn' ? (testOptions?.webnnOptions || {name: 'webnn'}) : modelTest.backend!;
259259
let mlContext: MLContext|undefined;
260-
if (modelTest.ioBinding.includes('ml-tensor') || modelTest.ioBinding.includes('ml-location')) {
260+
if(['ml-tensor', 'ml-location'].includes(modelTest.ioBinding)) {
261261

262262
const webnnOptions = executionProviderConfig as ort.InferenceSession.WebNNExecutionProviderOption;
263263
const deviceType = (webnnOptions as ort.InferenceSession.WebNNContextOptions)?.deviceType;

onnxruntime/wasm/pre-jsep.js

-3
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,6 @@ Module['jsepInit'] = (name, params) => {
226226
backend['onReleaseSession'](sessionId);
227227
};
228228
Module['jsepReleaseBufferId'] = Module.jsepReleaseBufferId;
229-
Module['jsepGetMLContext'] = sessionId => {
230-
return backend['getMLContext'](sessionId);
231-
};
232229
Module['jsepCreateMLBufferDownloader'] = (bufferId, type) => {
233230
return backend['createMLBufferDownloader'](bufferId, type);
234231
}

0 commit comments

Comments
 (0)