summaryrefslogtreecommitdiff
path: root/modules/remote-hip/c++/remote.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-hip/c++/remote.hpp')
-rw-r--r--modules/remote-hip/c++/remote.hpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/modules/remote-hip/c++/remote.hpp b/modules/remote-hip/c++/remote.hpp
index 5bb41cf..ce4c248 100644
--- a/modules/remote-hip/c++/remote.hpp
+++ b/modules/remote-hip/c++/remote.hpp
@@ -63,6 +63,35 @@ public:
}
/**
+ * Info
+ */
+ std::string get_info() const {
+ std::stringstream sstr;
+ int dev_count;
+ hipGetDeviceCount(&dev_count);
+ for(int i = 0; i < dev_count; ++i){
+ hipSetDevice(i);
+
+ hipDeviceProp_t props{};
+ hipGetDeviceProperties(&props, i);
+
+ sstr << "Name: " << props.name << '\n';
+ /*
+ sstr << "totalGlobalMem: " << props.totalGlobalMem << " GiB\n";
+ sstr << "sharedMemPerBlock: " << props.sharedMemPerBlock << " KiB\n";
+ sstr << "regsPerBlock: " << props.regsPerBlock << '\n';
+ sstr << "warpSize: " << props.warpSize << '\n';
+ sstr << "maxThreadsPerBlock: " << props.maxThreadsPerBlock << '\n';
+ sstr << "maxThreadsDim: " << "(" << props.maxThreadsDim[0] << ", " << props.maxThreadsDim[1] << ", " << props.maxThreadsDim[2] << ")\n";
+ sstr << "maxGridSize: " << "(" << props.maxGridSize[0] << ", " << props.maxGridSize[1] << ", " << props.maxGridSize[2] << ")\n";
+ sstr << "clockRate: " << props.clockRate << " Mhz\n";
+ */
+ }
+
+ return sstr.str();
+ }
+
+ /**
* Parse address, but don't resolve it.
*/
error_or<own<remote_address<rmt::Hip>>> parse_address(uint64_t dev_id = 0u){