Skip to content

[CI] Reduce scope of secrets#413

Merged
hjjq merged 2 commits intohidet-org:mainfrom
hjjq:ci
Jan 9, 2024
Merged

[CI] Reduce scope of secrets#413
hjjq merged 2 commits intohidet-org:mainfrom
hjjq:ci

Conversation

@hjjq
Copy link
Copy Markdown
Collaborator

@hjjq hjjq commented Jan 9, 2024

No description provided.

@hjjq hjjq merged commit 873d3a1 into hidet-org:main Jan 9, 2024
@hjjq hjjq deleted the ci branch January 9, 2024 19:37
vadiklyutiy pushed a commit that referenced this pull request Dec 19, 2024
This PR adds two utility functions to allow us to profile a function
with nsys/ncu in the code.

Usage:

```python
import os
import pytest
import torch
from hidet.utils.nsys_utils import nsys_run, nsys_get_path

def func(b):
    a = torch.randn(1000, device='cuda')
    a + b


def main():
    # profile with nsight system, store the result to 'nsys-reports/...'
    report = nsys_run(func, b=1)

    # we can visualize the profiling result by calling the `visualize` method.
    report.visualize()

if __name__ == '__main__':
    # we need to wrap the call to `main` inside '__main__' so that this script can be "imported" without 
    # side effect, which is one requirement for the utility
    main()
```
vadiklyutiy pushed a commit that referenced this pull request Dec 20, 2024
This PR adds two utility functions to allow us to profile a function
with nsys/ncu in the code.

Usage:

```python
import os
import pytest
import torch
from hidet.utils.nsys_utils import nsys_run, nsys_get_path

def func(b):
    a = torch.randn(1000, device='cuda')
    a + b


def main():
    # profile with nsight system, store the result to 'nsys-reports/...'
    report = nsys_run(func, b=1)

    # we can visualize the profiling result by calling the `visualize` method.
    report.visualize()

if __name__ == '__main__':
    # we need to wrap the call to `main` inside '__main__' so that this script can be "imported" without 
    # side effect, which is one requirement for the utility
    main()
```
vadiklyutiy pushed a commit that referenced this pull request Dec 26, 2024
This PR adds two utility functions to allow us to profile a function
with nsys/ncu in the code.

Usage:

```python
import os
import pytest
import torch
from hidet.utils.nsys_utils import nsys_run, nsys_get_path

def func(b):
    a = torch.randn(1000, device='cuda')
    a + b


def main():
    # profile with nsight system, store the result to 'nsys-reports/...'
    report = nsys_run(func, b=1)

    # we can visualize the profiling result by calling the `visualize` method.
    report.visualize()

if __name__ == '__main__':
    # we need to wrap the call to `main` inside '__main__' so that this script can be "imported" without 
    # side effect, which is one requirement for the utility
    main()
```
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.

1 participant