Skip to content

Commit

Permalink
address Yang's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
qjia7 committed Jan 22, 2024
1 parent 3ac29fe commit 0bf0b64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion js/web/lib/wasm/binding/ort-wasm.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export interface OrtWasmModule extends EmscriptenModule {
(gpuBuffer: GPUBuffer, size: number,
type: Tensor.GpuBufferDataTypes) => () => Promise<Tensor.DataTypeMap[Tensor.GpuBufferDataTypes]>;
/**
* [exported from js_internal_api.js] specify a session.run is triggered.
* [exported from js_internal_api.js] Called when InferenceSession.run started.
*/
jsepOnRunStart: () => void;
// #endregion
Expand Down
3 changes: 3 additions & 0 deletions js/web/lib/wasm/jsep/backend-webgpu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ export class WebGpuBackend {
};

Object.defineProperty(this.env.webgpu, 'device', {value: this.device});

// init queryType, which is necessary for InferenceSession.create
this.setQueryType();
}

dispose(): void {
Expand Down

0 comments on commit 0bf0b64

Please sign in to comment.