Skip to content

Commit

Permalink
Make ITraceActivity::flowId return int64_t instead of int (#1019)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #1019

RoctracerActivity::flowId and CuptiActivity::flowId return correlationId(), which is an int64.

I think we had an instance (https://fburl.com/workplace/zzygx11m) of some correlationIds > 2**31, which was causing `ChromeTraceLogger::handleActivity` (in `output_json.cpp`) to skip writing the links here:
```
  if (op.flowId() > 0) {
    handleGenericLink(op);
  }
```

Reviewed By: aaronenyeshi, sraikund16

Differential Revision: D66827501

fbshipit-source-id: 1dd8748a4b81c0e9d703fbc80a450c5d350617e7
  • Loading branch information
davidberard98 authored and facebook-github-bot committed Dec 6, 2024
1 parent 698c71c commit a52ff32
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion libkineto/include/GenericTraceActivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GenericTraceActivity : public ITraceActivity {
return flow.type;
}

int flowId() const override {
int64_t flowId() const override {
return flow.id;
}

Expand Down
2 changes: 1 addition & 1 deletion libkineto/include/ITraceActivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct ITraceActivity {
virtual int64_t correlationId() const = 0;
// Part of a flow, identified by flow id and type
virtual int flowType() const = 0;
virtual int flowId() const = 0;
virtual int64_t flowId() const = 0;
virtual bool flowStart() const = 0;
virtual ActivityType type() const = 0;
virtual const std::string name() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion libkineto/src/CuptiActivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ struct CuptiActivity : public ITraceActivity {
int flowType() const override {
return kLinkAsyncCpuGpu;
}
int flowId() const override {
int64_t flowId() const override {
return correlationId();
}
const T& raw() const {
Expand Down
2 changes: 1 addition & 1 deletion libkineto/src/RoctracerActivity.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct RoctracerActivity : public ITraceActivity {
int flowType() const override {
return kLinkAsyncCpuGpu;
}
int flowId() const override {
int64_t flowId() const override {
return correlationId();
}
const T& raw() const {
Expand Down

0 comments on commit a52ff32

Please sign in to comment.