mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-20 19:12:24 +00:00
[js/web] release session after use in npm test (#17470)
### Description release session after use in npm test. This is one of the prerequisites for supporting IO binding for WebGPU buffer in onnxruntime-web. list of prerequisites PRs: #17465 #17469 #17470 (this one)
This commit is contained in:
parent
49511b5483
commit
f923eec28b
2 changed files with 4 additions and 3 deletions
|
|
@ -110,9 +110,9 @@ for (const group of ORT_WEB_TEST_CONFIG.model) {
|
|||
test, ORT_WEB_TEST_CONFIG.profile, ORT_WEB_TEST_CONFIG.options.sessionOptions);
|
||||
});
|
||||
|
||||
after('release session', () => {
|
||||
after('release session', async () => {
|
||||
if (context) {
|
||||
context.release();
|
||||
await context.release();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -210,11 +210,12 @@ export class ModelTestContext {
|
|||
Logger.verbose('TestRunner.Perf', '***Perf Data End');
|
||||
}
|
||||
|
||||
release(): void {
|
||||
async release(): Promise<void> {
|
||||
if (this.profile) {
|
||||
this.session.endProfiling();
|
||||
}
|
||||
this.logPerfData();
|
||||
await this.session.release();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue