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

Check And Remove Duplicates in chosen_metrics #202

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

michaelmckinsey1
Copy link
Collaborator

@Yejashi Found a case where trying to add the same metric twice causes a bug.

Ex:

ncu_metrics = [
    "gpu__time_duration.sum",
    "gpu__time_duration.sum",
    "sm__throughput.avg.pct_of_peak_sustained_elapsed",
    "smsp__maximum_warps_avg_per_active_cycle",
    "smsp__maximum_warps_avg_per_active_cycle",
    "smsp__maximum_warps_avg_per_active_cycle",
]

is correctly handled now and prints a warning:

UserWarning: Removing duplicate metrics in chosen_metrics: ['gpu__time_duration.sum', 'smsp__maximum_warps_avg_per_active_cycle']

This is different from the functionality that checks if metrics in chosen_metrics are already in the performance data.

@michaelmckinsey1 michaelmckinsey1 added area-external Issues and PRs related to external libraries used by Thicket priority-normal Normal priority issues and PRs status-ready-for-review This PR is ready to be reviewed by assigned reviewers type-feature Requests for new features or PRs which implement new features labels Aug 2, 2024
@michaelmckinsey1 michaelmckinsey1 self-assigned this Aug 2, 2024
Copy link
Collaborator

@ilumsden ilumsden left a comment

Choose a reason for hiding this comment

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

LGTM.

I have one comment about the performance of identifying the duplicates, but, IMO, it's not a big enough thing to block up this PR.

@pearce8 this PR is ready for your review.

met
for met, count in collections.Counter(chosen_metrics).items()
if count > 1
]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This works, although it's not very efficient (collections.Counter is known for being pretty slow). That being said, we have other inefficiencies that we'll run into before this becomes a meaningful issue.

@ilumsden ilumsden added status-approved No more revisions are required on this PR and it is ready for merge and removed status-ready-for-review This PR is ready to be reviewed by assigned reviewers labels Aug 12, 2024
@michaelmckinsey1 michaelmckinsey1 added this to the 2024.2.0 milestone Sep 4, 2024
@slabasan slabasan merged commit 0b77659 into LLNL:develop Oct 25, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-external Issues and PRs related to external libraries used by Thicket priority-normal Normal priority issues and PRs status-approved No more revisions are required on this PR and it is ready for merge type-feature Requests for new features or PRs which implement new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants