Skip to content

Elastic broken on M1 using GPU #4

@AlbertDominguez

Description

@AlbertDominguez

Apparently the elastic augmentation on the GPU on the M1 chip is currently broken.

Below an example to reproduce the issue:

import augmend
import matplotlib.pyplot as plt
import numpy as np


aug = augmend.Augmend()
kwargs=dict(amount=20, grid=3, order=0)
aug.add([augmend.transforms.Elastic(use_gpu=False, **kwargs), augmend.transforms.Elastic(use_gpu=True, **kwargs)])

x = np.zeros((100,100), np.float32)
x[40:60,50:90] = 1

y_cpu, y_gpu = aug([x,x])

plt.figure(figsize=(20,6))
plt.subplot(1,3,1)
plt.imshow(x)
plt.subplot(1,3,2)
plt.imshow(y_cpu, interpolation='none')
plt.title("CPU")
plt.subplot(1,3,3)
plt.imshow(y_gpu, interpolation='none')
plt.title("GPU")

Screenshot 2022-06-29 at 12 30 53

Metadata

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