Skip to content

Conversation

@ezyang
Copy link
Contributor

@ezyang ezyang commented Jun 7, 2017

This commit adds support for the simple, ASCII message only
NVTX functions. There are a few more but these are the ones
I'm mostly interested in.

I tested by running this script under nvprof:

import torch.cuda.nvtx
torch.cuda.nvtx.range_push("foo")
torch.cuda.nvtx.mark("bar")
torch.cuda.nvtx.range_pop()

And verifying that the events showed up.

Signed-off-by: Edward Z. Yang [email protected]

Copy link
Contributor

@apaszke apaszke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be nice to add support for colors too. Should be easy to do

setup.py Outdated

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

Copy link
Member

@colesbury colesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple test would be good so at least we can check that the library is loaded correctly.

This comment was marked as off-topic.

This comment was marked as off-topic.

@colesbury
Copy link
Member

This looks good, just fix the lint and the Python 3 contbuild

ezyang added 2 commits June 9, 2017 11:08
This commit adds support for the simple, ASCII message only
NVTX functions.  There are a few more but these are the ones
I'm mostly interested in.

I tested by running this script under nvprof:

    import torch.cuda.nvtx
    torch.cuda.nvtx.range_push("foo")
    torch.cuda.nvtx.mark("bar")
    torch.cuda.nvtx.range_pop()

And verifying that the events showed up.

NB: An earlier version of this patch lazily loaded libNvExtTools.so.
At the prompting of @colesbury, we decided against this, because
dynamically loading the library means we can get into bad
situations where we load the wrong version of the library.  If we
do it at build time, this situation won't occur.

Signed-off-by: Edward Z. Yang <[email protected]>
- Remove redundant imports from torch.cuda.nvtx
- Import torch.cuda.nvtx from torch.cuda, so it becomes available when
  you import torch.cuda
- Add a small, trivial test to test_cuda.py

Signed-off-by: Edward Z. Yang <[email protected]>
Signed-off-by: Edward Z. Yang <[email protected]>
@ezyang
Copy link
Contributor Author

ezyang commented Jun 10, 2017

All good!

global lib
if lib is None:
lib = ctypes.cdll.LoadLibrary(None)
lib.nvtxMarkA.restype = None

This comment was marked as off-topic.

This comment was marked as off-topic.

@apaszke apaszke merged commit ba690d5 into pytorch:master Jun 10, 2017
@ezyang ezyang deleted the nvtx branch September 7, 2017 20:29
houseroad added a commit to houseroad/pytorch that referenced this pull request Jan 19, 2019
…8bdbe7

Summary:
Previous import was fd60104394fa353e1762f44ecad1b2166e33deef

Included changes:
- **[c553fb3](onnx/onnx@c553fb3)**: Handle negative axis in scan shape inference (pytorch#1748) <G. Ramalingam>
- **[51b6ecc](onnx/onnx@51b6ecc)**: external_data: Store large tensor values in separate files (pytorch#678) <Michał Karzyński>
- **[ba05f26](onnx/onnx@ba05f26)**: Scan output axes (pytorch#1737) <G. Ramalingam>
- **[90920c0](onnx/onnx@90920c0)**: Add NonZero op. (pytorch#1714) <Sergii Dymchenko>
- **[c4cf112](onnx/onnx@c4cf112)**: fix the test cases for constantofshape (pytorch#1746) <Lu Fang>
- **[d902349](onnx/onnx@d902349)**: Add sample implementation support (pytorch#1712) <Lu Fang>

Differential Revision: D13745693

fbshipit-source-id: 057d827652e85ad19be8f0243d874e036bf69898
facebook-github-bot pushed a commit that referenced this pull request Jan 21, 2019
…8bdbe7 (#16190)

Summary:
Pull Request resolved: #16190

Previous import was fd60104394fa353e1762f44ecad1b2166e33deef

Included changes:
- **[c553fb3](onnx/onnx@c553fb3)**: Handle negative axis in scan shape inference (#1748) <G. Ramalingam>
- **[51b6ecc](onnx/onnx@51b6ecc)**: external_data: Store large tensor values in separate files (#678) <Michał Karzyński>
- **[ba05f26](onnx/onnx@ba05f26)**: Scan output axes (#1737) <G. Ramalingam>
- **[90920c0](onnx/onnx@90920c0)**: Add NonZero op. (#1714) <Sergii Dymchenko>
- **[c4cf112](onnx/onnx@c4cf112)**: fix the test cases for constantofshape (#1746) <Lu Fang>
- **[d902349](onnx/onnx@d902349)**: Add sample implementation support (#1712) <Lu Fang>

Differential Revision: D13745693

fbshipit-source-id: 05e2cce9ae1dfa2865db83840df64673d55cea57
akashveramd pushed a commit to akashveramd/pytorch that referenced this pull request Apr 9, 2025
* upgrade sqlalchemy version

* replace the connection with engine in to_sql call

* change the hipTes=nsor ctest syntax
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.

3 participants