mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-27 23:32:02 +08:00
Fix for the HIP build+test errors.
The errors were introduced by this commit : After the above mentioned commit, some of the tests started failing with the following error ``` Built target cxx11_tensor_reduction Building HIPCC object unsupported/test/CMakeFiles/cxx11_tensor_reduction_gpu_5.dir/cxx11_tensor_reduction_gpu_5_generated_cxx11_tensor_reduction_gpu.cu.o In file included from /home/rocm-user/eigen/unsupported/test/cxx11_tensor_reduction_gpu.cu:16: In file included from /home/rocm-user/eigen/unsupported/Eigen/CXX11/Tensor:117: /home/rocm-user/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h:155:5: error: the field type is not amp-compatible DestinationBufferKind m_kind; ^ /home/rocm-user/eigen/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h:211:3: error: the field type is not amp-compatible DestinationBuffer m_destination; ^ ``` For some reason HIPCC does not like device code to contain enum types which do not have the base-type explicitly declared. The fix is trivial, explicitly state "int" as the basetype
This commit is contained in:
parent
df0e8b8137
commit
102cf2a72d
@ -80,7 +80,14 @@ class TensorBlockDescriptor {
|
||||
// evaluated expression scalar type.
|
||||
class DestinationBuffer {
|
||||
public:
|
||||
enum DestinationBufferKind {
|
||||
enum DestinationBufferKind : int {
|
||||
// The above explicit specification of "int" as the enum basetype is needed
|
||||
// to get around a HIPCC link error ("the field type is not amp-compatible")
|
||||
// which is issued for class members with the enum type.
|
||||
// TODO(rocm):
|
||||
// remove the "int" basetype once HIPCC has been fixed to not error out
|
||||
// in the above scenario.
|
||||
|
||||
// Destination buffer is not defined (`m_data` == nullptr).
|
||||
kEmpty,
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user