@@ -65,7 +65,7 @@ class CudaActivityProfileController : public cali::ChannelController
65
65
" *,scale(cupti.activity.duration,1e-9) as \" time (gpu)\" unit sec"
66
66
" ,scale(sum#cupti.host.duration,1e-9) as \" time\" unit sec"
67
67
},
68
- { " group by" , " prop:nested ,cupti.kernel.name,cupti.activity.kind,mpi.rank" },
68
+ { " group by" , " path ,cupti.kernel.name,cupti.activity.kind,mpi.rank" },
69
69
{ " format" , format }
70
70
});
71
71
} else {
@@ -76,7 +76,7 @@ class CudaActivityProfileController : public cali::ChannelController
76
76
{ " select" ,
77
77
" *,scale(cupti.activity.duration,1e-9) as \" time (gpu)\" unit sec"
78
78
" ,scale(sum#cupti.host.duration,1e-9) as \" time\" unit sec" },
79
- { " group by" , " prop:nested ,cupti.kernel.name,cupti.activity.kind" },
79
+ { " group by" , " path ,cupti.kernel.name,cupti.activity.kind" },
80
80
{ " format" , format }
81
81
});
82
82
}
@@ -90,7 +90,7 @@ std::string
90
90
check_args (const cali::ConfigManager::Options& opts) {
91
91
// Check if output.format is valid
92
92
93
- std::string format = opts.get (" output.format" , " json-split " ).to_string ();
93
+ std::string format = opts.get (" output.format" , " cali " ).to_string ();
94
94
std::set<std::string> allowed_formats = { " cali" , " json" , " json-split" , " hatchet" };
95
95
96
96
if (allowed_formats.find (format) == allowed_formats.end ())
@@ -102,46 +102,48 @@ check_args(const cali::ConfigManager::Options& opts) {
102
102
cali::ChannelController*
103
103
make_controller (const char * name, const config_map_t & initial_cfg, const cali::ConfigManager::Options& opts)
104
104
{
105
- std::string format = opts.get (" output.format" , " json-split " ).to_string ();
105
+ std::string format = opts.get (" output.format" , " cali " ).to_string ();
106
106
107
107
if (format == " hatchet" )
108
108
format = " json-split" ;
109
109
110
110
if (!(format == " json-split" || format == " json" || format == " cali" )) {
111
- format = " json-split " ;
112
- Log (0 ).stream () << " hatchet-region -profile: Unknown output format \" " << format
113
- << " \" . Using json-split ."
111
+ format = " cali " ;
112
+ Log (0 ).stream () << " cuda-activity -profile: Unknown output format \" " << format
113
+ << " \" . Using cali ."
114
114
<< std::endl;
115
115
}
116
116
117
117
return new CudaActivityProfileController (name, initial_cfg, opts, format);
118
118
}
119
119
120
- const char * controller_spec =
121
- " {"
122
- " \" name\" : \" cuda-activity-profile\" ,"
123
- " \" description\" : \" Record CUDA activities and a write profile\" ,"
124
- " \" categories\" : [ \" adiak\" , \" metric\" , \" cuptitrace.metric\" , \" output\" , \" region\" , \" event\" ],"
125
- " \" services\" : [ \" aggregate\" , \" cupti\" , \" cuptitrace\" , \" event\" ],"
126
- " \" config\" : "
127
- " { \" CALI_CHANNEL_FLUSH_ON_EXIT\" : \" false\" ,"
128
- " \" CALI_EVENT_ENABLE_SNAPSHOT_INFO\" : \" false\" ,"
129
- " \" CALI_CUPTITRACE_SNAPSHOT_DURATION\" : \" true\" "
130
- " },"
131
- " \" options\" : "
132
- " ["
133
- " { "
134
- " \" name\" : \" output.format\" ,"
135
- " \" type\" : \" string\" ,"
136
- " \" description\" : \" Output format ('hatchet', 'cali', 'json')\" "
137
- " },"
138
- " { "
139
- " \" name\" : \" use.mpi\" ,"
140
- " \" type\" : \" bool\" ,"
141
- " \" description\" : \" Merge results into a single output stream in MPI programs\" "
142
- " }"
143
- " ]"
144
- " }" ;
120
+ const char * controller_spec = R"json(
121
+ {
122
+ "name" : "cuda-activity-profile",
123
+ "description" : "Record CUDA activities and a write profile",
124
+ "categories" : [ "adiak", "metric", "cuptitrace.metric", "output", "region", "event" ],
125
+ "services" : [ "aggregate", "cupti", "cuptitrace", "event" ],
126
+ "config" :
127
+ { "CALI_CHANNEL_FLUSH_ON_EXIT" : "false",
128
+ "CALI_EVENT_ENABLE_SNAPSHOT_INFO" : "false",
129
+ "CALI_CUPTITRACE_SNAPSHOT_DURATION" : "true"
130
+ },
131
+ "defaults" : { "node.order": "true" },
132
+ "options":
133
+ [
134
+ {
135
+ "name": "output.format",
136
+ "type": "string",
137
+ "description": "Output format ('hatchet', 'cali', 'json')"
138
+ },
139
+ {
140
+ "name": "use.mpi",
141
+ "type": "bool",
142
+ "description": "Merge results into a single output stream in MPI programs"
143
+ }
144
+ ]
145
+ };
146
+ )json" ;
145
147
146
148
} // namespace [anonymous]
147
149
0 commit comments