Skip to content

bug: Identity modality breaks using GPU backend #124

@federico-carrara

Description

@federico-carrara

Description

I recently tried to move to GPU backends (cupy) for simulating spectral data when simulating a small number of spectral bands (for large number of bins, I am always running into GPU OOMs).

I spotted a bug in the Identity modality at this line, as contrary to ground_truth, em_rates is never converted to the chosen backend before.

In my fork, I came up with this quick monketypatch:

em_rates = em_rates.sum(Axis.W)
em_rates = em_rates.copy(data=xp.asarray(em_rates.data))
em_image = em_rates * truth

@tlambert03 do you have a better alternative to propose?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions