Skip to content

metrics should have an unsafe option #200

Open
@mfbalin

Description

🚀 The feature

For high performance low latency use cases, any CPU GPU synchronization kills the performance. The metrics should have an unsafe option assuming all inputs are valid and avoid any synchronization such as here:

if num_label_is_zero.any():
logging.warning(
"Warning: Some classes do not exist in the target. F1 scores for these classes will be cast to zeros."
)

Motivation, pitch

I am developing a high performance GNN library where each iteration can take less than 10ms. Any synchronization kills the performance of my use case.

Alternatives

No response

Additional context

No response

Activity

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      metrics should have an unsafe option · Issue #200 · pytorch/torcheval