Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js/webgpu] allow to specify callback for profiling data #18732

Merged
merged 5 commits into from
Dec 7, 2023

Conversation

fs-eire
Copy link
Contributor

@fs-eire fs-eire commented Dec 6, 2023

Description

This PR is a replacement of #17820.

allow to specify callback for profiling data

Previous:

ort.env.webgpu.profilingMode = 'default';  // enable profiling

// profiling data will output to console.

Now:

ort.env.webgpu.profiling = {
  mode: 'default';  // enable profiling
  ondata: (data) => {
    // .. process the profiling data
  }
};

//for each kernel, "ondata" will be called once. only output to console if ondata is not specified.

@fs-eire fs-eire merged commit efbef5f into main Dec 7, 2023
104 checks passed
@fs-eire fs-eire deleted the fs-eire/profiling-config-new branch December 7, 2023 22:10
siweic0 pushed a commit to siweic0/onnxruntime-web that referenced this pull request May 9, 2024
…8732)

### Description

**This PR is a replacement of microsoft#17820.**

allow to specify callback for profiling data

*Previous*:
```js
ort.env.webgpu.profilingMode = 'default';  // enable profiling

// profiling data will output to console.
```

*Now*:
```js
ort.env.webgpu.profiling = {
  mode: 'default';  // enable profiling
  ondata: (data) => {
    // .. process the profiling data
  }
};

//for each kernel, "ondata" will be called once. only output to console if ondata is not specified.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants