Skip to content

warn on batched_mul_generic!? #478

@chengchingwen

Description

@chengchingwen
Member

The batched_mul_generic! is really slow on both cpu and gpu, but somehow it isn't something easy to find. It might worth displaying a one time warning like the cuda scalar indexing warning.

Activity

ToucheSir

ToucheSir commented on Feb 26, 2023

@ToucheSir
Member

Between this and #475 I wonder if we shouldn't have a more general "slow fallback" policy like other libraries do. The simplest version of this would be toggleable warnings when generic methods are called. Could this be generalized and/or made more sophisticated?

mcabbott

mcabbott commented on Nov 7, 2024

@mcabbott
Member

The slow paths for conv do print warnings, so batched_mul! could at least follow that.

Agree that ideally there would be a way to make these errors, like CUDA. (Whose default is now error not warning.)

Xref FluxML/Flux.jl#2454, about adding some similar switch.

linked a pull request that will close this issue on Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ToucheSir@chengchingwen@mcabbott

      Issue actions

        warn on `batched_mul_generic!`? · Issue #478 · FluxML/NNlib.jl