From f46a2c561e6d382a657b46b4209fe135c74ccbe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20S=C3=A1nchez?= Date: Tue, 20 Jan 2026 19:12:53 +0000 Subject: [PATCH] Fix bad static access for TensorDeviceGpu. libeigen/eigen!2111 --- unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h index a13aa7f72..71788cd1e 100644 --- a/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h +++ b/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceGpu.h @@ -45,9 +45,9 @@ class StreamInterface { class GpuDeviceProperties { public: static const GpuDeviceProperties& instance() { - static const GpuDeviceProperties& kInstance = *new GpuDeviceProperties(); + static const GpuDeviceProperties* kInstance = new GpuDeviceProperties(); - return kInstance; + return *kInstance; } EIGEN_STRONG_INLINE const gpuDeviceProp_t& get(int device) const { return device_properties_[device]; } @@ -64,7 +64,7 @@ class GpuDeviceProperties { } std::vector device_properties(num_devices); for (int i = 0; i < num_devices; ++i) { - status = gpuGetDeviceProperties(&device_properties_[i], i); + status = gpuGetDeviceProperties(&device_properties[i], i); if (status != gpuSuccess) { std::cerr << "Failed to initialize GPU device #" << i << ": " << gpuGetErrorString(status) << std::endl; gpu_assert(status == gpuSuccess);