Skip to content

Commit

Permalink
Fixed use of designated initializers Windows (#976)
Browse files Browse the repository at this point in the history
Summary:
Fix CUPTI code not compiling on MSVC due to designated initializers not working on Windows.
`C:\Work\pytorch\third_party\kineto\libkineto\src\CuptiActivityProfiler.cpp(658): error C7555: use of designated initializers requires at least '/std:c++20'`

Pull Request resolved: #976

Reviewed By: aaronenyeshi

Differential Revision: D61810245

Pulled By: sraikund16

fbshipit-source-id: 240a8163477e70b3a3cef0a78bc7cea260d5528e
  • Loading branch information
mantaionut authored and facebook-github-bot committed Aug 27, 2024
1 parent 464bccf commit 58ed2c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libkineto/src/CuptiActivityProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,11 @@ void CuptiActivityProfiler::handleCudaSyncActivity(
if (isWaitEventSync(activity->type)) {
// Defer logging wait event syncs till the end so we only
// log these events if a stream has some GPU kernels on it.
DeferredLogEntry entry{
.device = device_id,
.stream = activity->streamId,
.logMe = log_event,
};
DeferredLogEntry entry;
entry.device = device_id;
entry.stream = activity->streamId;
entry.logMe = log_event;

logQueue_.push_back(entry);
} else {
log_event();
Expand Down

0 comments on commit 58ed2c0

Please sign in to comment.