aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/Eigen/CXX11
diff options
context:
space:
mode:
authorGravatar Deven Desai <deven.desai.amd@gmail.com>2019-10-22 19:21:27 +0000
committerGravatar Deven Desai <deven.desai.amd@gmail.com>2019-10-22 19:21:27 +0000
commit102cf2a72d79b18f9e321ce37a58fb833ec2e578 (patch)
tree56fb9a0fa7a1b61bd69607596e8228d4ce41f1c3 /unsupported/Eigen/CXX11
parentdf0e8b81370f741c734e4f4187d029d6a8cb18f2 (diff)
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
Diffstat (limited to 'unsupported/Eigen/CXX11')
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h b/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h
index c85c4c6c8..48417c12e 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h
+++ b/unsupported/Eigen/CXX11/src/Tensor/TensorBlockV2.h
@@ -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,