Giter Club home page Giter Club logo

Comments (5)

TaekyungHeo avatar TaekyungHeo commented on July 17, 2024

Please make sure you use the latest PyTorch version. You can try pytorch-nightly.

from chakra.

XcodeRole avatar XcodeRole commented on July 17, 2024

But when I use the command conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia to install pytorch-nightly, I found that there is only the cpu version of pytorch:
conda list:
pytorch 2.4.0.dev20240610 py3.11_cpu_0 pytorch-nightly

from chakra.

XcodeRole avatar XcodeRole commented on July 17, 2024

After installing the latest version of pytorch from the source code, I did collect record function id, but found that they were all 0.
kineto_trace_0.json :

"distributedInfo": {"backend": "nccl", "rank": 0, "world_size": 2, "pg_count": 1, "pg_config": [{"pg_name": "0", "pg_desc": "default_pg", "backend_config": "cuda:nccl", "pg_size": 2, "ranks": [0, 1]}], "nccl_version": "2.20.5"},
  "traceEvents": [
  {
    "ph": "X", "cat": "cpu_op", "name": "autograd::engine::evaluate_function: NllLossBackward0", "pid": 19449, "tid": 19871,
    "ts": 6200919497584.082, "dur": 69.113,
    "args": {
      "External id": 2561,"Record function id": 0, "Sequence number": 1357, "Fwd thread id": 1, "Ev Idx": 0
    }
  },
  {
    "ph": "X", "cat": "cpu_op", "name": "NllLossBackward0", "pid": 19449, "tid": 19871,
    "ts": 6200919497588.947, "dur": 57.355,
    "args": {
      "External id": 2562,"Record function id": 0, "Sequence number": 1357, "Fwd thread id": 1, "Ev Idx": 1
    }
  },
  {
    "ph": "f", "id": 1, "pid": 19449, "tid": 19871, "ts": 6200919497588.947,
    "cat": "fwdbwd", "name": "fwdbwd", "bp": "e"
  },
  {
    "ph": "X", "cat": "cpu_op", "name": "aten::nll_loss_backward", "pid": 19449, "tid": 19871,
    "ts": 6200919497593.060, "dur": 52.436,
    "args": {
      "External id": 2563,"Record function id": 0, "Ev Idx": 2
    }
  },
  {
    "ph": "X", "cat": "cpu_op", "name": "aten::zero_", "pid": 19449, "tid": 19871,
    "ts": 6200919497606.506, "dur": 27.350,
    "args": {
      "External id": 2564,"Record function id": 0, "Ev Idx": 3
    }
  },

from chakra.

TaekyungHeo avatar TaekyungHeo commented on July 17, 2024

Hi, @XcodeRole. I am not sure why this is happening. Could you please create an issue in PyTorch since it is related to the PyTorch profiler?

from chakra.

XcodeRole avatar XcodeRole commented on July 17, 2024

Thank you for your reply. I have solved the problem. Using on_trace_ready=torch.profiler.tensorboard_trace_handler to collect kineto trace, the record function id behavior becomes normal. When using prof.export_chrome_trace(f"kineto_trace.json"), the record function id information is lost.

from chakra.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.