arrayfire
arrayfire copied to clipboard
Fixed Issue 3558 cl::Platform type incompatibility with OpenCL-HPP v2023.12.14
Fix compilation error due to OpenCL HPP headers change in the type returned by getInfo<CL_DEVICE_PLATFORM>()
Description
- Is this a new feature or a bug fix?: Bug Fix
- More detail if necessary to describe all commits in pull request: change explicit
cl_platform_idtype toauto - Why these changes are necessary: fixes incompatibility when compilation with a more recent version of opencl hpp headers
- Potential impact on specific hardware, software or backends: greater compatibility of opencl versions
- New functions and their functionality: None
- Can this PR be backported to older versions?: Yes
- Future changes not implemented in this PR.: None
Fixes: #3558
Changes to Users
- No options added to the build.
- No action required by the user
Checklist
- [x] Rebased on latest master
- [x] Code compiles
- [x] Tests pass
- [x] Functions added to unified API
- [x] Functions documented
oneflow.amin has the same issue
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()
y1 = flow.amin(x1,dim=1)
print(y1.device,y1)
x1 = flow.tensor(np.array([[float('inf'), 0, -1, float('nan'), 5]], dtype=np.float32))
x1 = x1.cpu()
y2 = flow.amin(x1,dim=1)
print(y2.device,y2)