Open Redmept1on opened 6 months ago
oneflow.gt/ge/greater/greater_equal perform differently between cpu and cuda. maybe from the same root cause.
Take greater_equal as an example
import oneflow as flow import numpy as np x1 = flow.tensor(np.array([float('inf'), 0, -1, float('nan'), 5], dtype=np.float32)) x1 = x1.cuda() x2 = flow.tensor(np.array([float('nan'), 0, -1, 1, 5], dtype=np.float32)) x2 = x2.cuda() y1 = flow.greater_equal(x1,x2) print(y1) x1 = flow.tensor(np.array([float('inf'), 0, -1, float('nan'), 5], dtype=np.float32)) x1=x1.cpu() x2 = flow.tensor(np.array([float('nan'), 0, -1, 1, 5], dtype=np.float32)) x2 = x2.cpu() y2 = flow.greater_equal(x1,x2) print(y2)
Summary
oneflow.gt/ge/greater/greater_equal perform differently between cpu and cuda. maybe from the same root cause.
Code to reproduce bug
Take greater_equal as an example
System Information