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

feat: improve how device switch is handled between the metric device and the input tensors device #3043

Merged
merged 24 commits into from
Aug 25, 2023

Commits on Aug 23, 2023

  1. Configuration menu
    Copy the full SHA
    750a6ca View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. feat: prioritize computation on GPU devices over CPUs

    If either one of the metric device or the update input device
    is a GPU, this commit will put the other one on GPU.
    MarcBresson committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    78a4c78 View commit details
    Browse the repository at this point in the history
  2. fix: use a temp var that will be moved with y_pred

    The comparison with self._device was not possible because it
    can be created with `torch.device("cuda")` which is not equal
    to `torch.device("cuda:0")` which is the device of a tensor
    created with `torch.device("cuda")`. This change will have
    a bigger performance hit when self._kernel is not on the same
    device as y_pred as it will need to be moved onto y_pred's
    device every time update() is called.
    MarcBresson committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    85eebd5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9125e60 View commit details
    Browse the repository at this point in the history
  4. feat: move self._kernel directly and issue a warning only when not al…

    …l y_pred tensors are on the same device
    MarcBresson committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    a4c2f7c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1908fff View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2547e70 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3269955 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    04af090 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Configuration menu
    Copy the full SHA
    7922ec9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b0625e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6817316 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d2aa8c8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c6bf8f8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f6f82fe View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    99c3469 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    eba6f68 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    91ae235 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    7284b01 View commit details
    Browse the repository at this point in the history
  11. test: remove skips

    MarcBresson committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    d96255c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2807f28 View commit details
    Browse the repository at this point in the history
  13. style: reorder imports

    MarcBresson committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    526234c View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    b6f1a21 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    0a38aa5 View commit details
    Browse the repository at this point in the history