xref: /aosp_15_r20/external/executorch/backends/vulkan/tools/gpuinfo/src/main.cpp (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #include "app.h"
10 #include "architecture.h"
11 #include "buffers.h"
12 #include "textures.h"
13 
14 using namespace vkapi;
15 
main(int argc,const char ** argv)16 int main(int argc, const char** argv) {
17   gpuinfo::App app;
18 
19   std::string file_path = "config.json";
20   if (argc > 1) {
21     file_path = argv[1];
22   };
23   app.load_config(file_path);
24 
25   // Architecture
26   gpuinfo::reg_count(app);
27   gpuinfo::warp_size(app);
28 
29   // Buffers
30   gpuinfo::buf_cacheline_size(app);
31   gpuinfo::buf_bandwidth(app);
32   gpuinfo::ubo_bandwidth(app);
33   gpuinfo::shared_mem_bandwidth(app);
34 
35   // Textures
36   gpuinfo::tex_bandwidth(app);
37   gpuinfo::tex_cacheline_concurr(app);
38 
39   return 0;
40 }
41