Skip to content

Commit eafe501

Browse files
committed
Convert device name and architexture to strings and Displaced maximum and currently used memory.
1 parent b6707b4 commit eafe501

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

‎graph_framework/metal_context.hpp‎

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,13 @@ namespace gpu {
9494
}
9595

9696
if (jit::verbose) {
97-
std::cout << "Metal GPU info." << std::endl;
98-
std::cout << " Max thread group memory : " << device.maxThreadgroupMemoryLength << std::endl;
99-
std::cout << " Max thread per group : " << device.maxThreadsPerThreadgroup.width << std::endl;
100-
std::cout << " Device name : " << device.name << std::endl;
101-
std::cout << " Architecture : " << device.architecture << std::endl;
97+
std::cout << "Metal GPU info." << std::endl
98+
<< " Max thread group memory : " << device.maxThreadgroupMemoryLength << std::endl
99+
<< " Max thread per group : " << device.maxThreadsPerThreadgroup.width << std::endl
100+
<< " Device name : " << [device.name cStringUsingEncoding:NSString.defaultCStringEncoding] << std::endl
101+
<< " Architecture : " << [device.architecture.name cStringUsingEncoding:NSString.defaultCStringEncoding] << std::endl
102+
<< " Max buffer length : " << device.maxBufferLength << std::endl
103+
<< " Max working set : " << device.recommendedMaxWorkingSetSize << std::endl;
102104
}
103105
}
104106

@@ -258,12 +260,13 @@ namespace gpu {
258260
NSUInteger thread_groups = total_parallel/threads_per_group + (total_parallel%threads_per_group ? 1 : 0);
259261

260262
if (jit::verbose) {
261-
std::cout << " Kernel name : " << kernel_name << std::endl;
262-
std::cout << " Thread execution width : " << thread_width << std::endl;
263-
std::cout << " Threads per group : " << threads_per_group << std::endl;
264-
std::cout << " Number of groups : " << thread_groups << std::endl;
265-
std::cout << " Total problem size : " << threads_per_group*thread_groups << std::endl;
266-
std::cout << " Total parallel size : " << total_parallel << std::endl;
263+
std::cout << " Kernel name : " << kernel_name << std::endl
264+
<< " Thread execution width : " << thread_width << std::endl
265+
<< " Threads per group : " << threads_per_group << std::endl
266+
<< " Number of groups : " << thread_groups << std::endl
267+
<< " Total problem size : " << threads_per_group*thread_groups << std::endl
268+
<< " Total parallel size : " << total_parallel << std::endl
269+
<< " Current allocation size : " << device.currentAllocatedSize << std::endl;
267270
}
268271

269272
if (state.get()) {

0 commit comments

Comments
 (0)