Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roctracer: Device ID is off by 2, manually start from 0 #925

Closed
wants to merge 1 commit into from

Conversation

aaronenyeshi
Copy link
Member

@aaronenyeshi aaronenyeshi commented May 3, 2024

Summary:
Although hipGetDeviceProperties shows 8 devices enumerating from 0 to 7, when using roctracer_record_t, the record->device_id enumerates from 2 to 9.

Manually enumerate from 0-7 by subtracting 2, and opened a bug report in ROCm/roctracer: ROCm/roctracer#98.

Differential Revision: D56951239

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56951239

aaronenyeshi added a commit to aaronenyeshi/kineto that referenced this pull request May 3, 2024
Summary:

Although hipGetDeviceProperties shows 8 devices enumerating from 0 to 7, when using roctracer_record_t, the record->device_id enumerates from 2 to 9.

Manually enumerate from 0-7 by subtracting 2, and opening a bug report in ROCm/roctracer.

Differential Revision: D56951239
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56951239

aaronenyeshi added a commit to aaronenyeshi/kineto that referenced this pull request May 3, 2024
Summary:

Although hipGetDeviceProperties shows 8 devices enumerating from 0 to 7, when using roctracer_record_t, the record->device_id enumerates from 2 to 9.

Manually enumerate from 0-7 by subtracting 2, and opened a bug report in ROCm/roctracer: ROCm/roctracer#98.

Test Plan:
CI and ran locally.

If using hipGetDeviceProperties, the ids start from 0 to 7, but Roctracer's roctracer_record_t enumerates devices from 2-7. Tested various combinations.

## Ran on GPU 0-7:
Before:
{F1503734690}  {F1503734811}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714765825/localhost/libkineto_activities_1679469.json.gz&bucket=gpu_traces
After:
{F1503735114}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714767517/localhost/libkineto_activities_3723929.json.gz&bucket=gpu_traces

## Ran on GPU 0:
Before, shows GPU 2:
{F1503735699}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714766546/localhost/libkineto_activities_2685136.json.gz&bucket=gpu_traces
After, shows GPU 0:
{F1503735909}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714768432/localhost/libkineto_activities_764017.json.gz&bucket=gpu_traces

## Ran on GPU 7:
Before, shows GPU 9:
{F1503736130}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714767155/localhost/libkineto_activities_3159876.json.gz&bucket=gpu_traces
After, shows GPU 7:
 {F1503736726}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714768581/localhost/libkineto_activities_1006961.json.gz&bucket=gpu_traces

Differential Revision: D56951239

Pulled By: aaronenyeshi
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56951239

@aaronenyeshi aaronenyeshi changed the title Device ID is off by 2, manually start from 0 Roctracer: Device ID is off by 2, manually start from 0 May 3, 2024
Summary:

Although hipGetDeviceProperties shows 8 devices enumerating from 0 to 7, when using roctracer_record_t, the record->device_id enumerates from 2 to 9.

Manually enumerate from 0-7 by subtracting 2, and opened a bug report in ROCm/roctracer: ROCm/roctracer#98.

Test Plan:
CI and ran locally.

If using hipGetDeviceProperties, the ids start from 0 to 7, but Roctracer's roctracer_record_t enumerates devices from 2-7. Tested various combinations.

## Ran on GPU 0-7:
Before:
{F1503734690}  {F1503734811}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714765825/localhost/libkineto_activities_1679469.json.gz&bucket=gpu_traces
After:
{F1503735114}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714767517/localhost/libkineto_activities_3723929.json.gz&bucket=gpu_traces

## Ran on GPU 0:
Before, shows GPU 2:
{F1503735699}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714766546/localhost/libkineto_activities_2685136.json.gz&bucket=gpu_traces
After, shows GPU 0:
{F1503735909}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714768432/localhost/libkineto_activities_764017.json.gz&bucket=gpu_traces

## Ran on GPU 7:
Before, shows GPU 9:
{F1503736130}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714767155/localhost/libkineto_activities_3159876.json.gz&bucket=gpu_traces
After, shows GPU 7:
 {F1503736726}
https://www.internalfb.com/intern/perfdoctor/trace_view?filepath=tree/traces/dynocli/0/1714768581/localhost/libkineto_activities_1006961.json.gz&bucket=gpu_traces

Differential Revision: D56951239

Pulled By: aaronenyeshi
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D56951239

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@houseroad houseroad left a comment

Choose a reason for hiding this comment

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

As we discussed internally.

@aaronenyeshi
Copy link
Member Author

Closing this as we may have a better fix via: #926. prototyping it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants