sys-sage
Loading...
Searching...
No Matches
mt4g.hpp
Go to the documentation of this file.
1#ifndef MT4G_PARSER
2#define MT4G_PARSER
3
4#include "Thread.hpp"
5#include "Core.hpp"
6#include "Cache.hpp"
7#include "Subdivision.hpp"
8#include "Numa.hpp"
9#include "Chip.hpp"
10#include "Memory.hpp"
11#include "Storage.hpp"
12#include "Node.hpp"
13#include "DataPath.hpp"
14
18namespace sys_sage {
26 int parseMt4gTopo(Node* parent, std::string dataSourcePath, int gpuId, std::string delim = ";");
34 int parseMt4gTopo(Component* parent, std::string dataSourcePath, int gpuId, std::string delim = ";");
41 int parseMt4gTopo(Chip* gpu, std::string dataSourcePath, std::string delim = ";");
42
44 class Mt4gParser
45 {
46 public:
47 Mt4gParser(Chip* gpu, std::string dataSourcePath, std::string delim = ";");
48
49 int ParseBenchmarkData();
50 private:
51 int ReadBenchmarkFile();
52 std::map<std::string,std::vector<std::string> > benchmarkData;
53 std::string dataSourcePath;
54 std::string delim;
55 Chip* root;
56 const bool latency_in_cycles;
57 bool L2_shared_on_gpu;
58 double Memory_Clock_Frequency;
59 int Memory_Bus_Width;
60
61 int parseGPU_INFORMATION();
62 int parseCOMPUTE_RESOURCE_INFORMATION();
63 int parseREGISTER_INFORMATION();
64 int parseADDITIONAL_INFORMATION();
65 int parseMemory(std::string header_name, std::string memory_name);
66 int parseCaches(std::string header_name, std::string cache_type);
67 };
68
70 const std::string whiteSpaces( " \f\n\r\t\v" );
72 void trimRight( std::string& str,const std::string& trimChars = whiteSpaces );
74 void trimLeft( std::string& str,const std::string& trimChars = whiteSpaces );
76 void trim( std::string& str, const std::string& trimChars = whiteSpaces );
77
78} //namespace sys_sage
79
80#endif //MT4G_PARSER
int parseMt4gTopo(Node *parent, std::string dataSourcePath, int gpuId, std::string delim=";")
Definition mt4g.cpp:17