@@ -122,7 +122,10 @@ void findFunc(Options &opts, ModuleOp mod) {
122
122
}
123
123
}
124
124
125
+ #include < iostream>
126
+
125
127
int main (int argc, char **argv) {
128
+ std::cout << " STARTING GC-GPU-RUNNER" << std::endl;
126
129
Options opts;
127
130
llvm::cl::ParseCommandLineOptions (argc, argv, " GraphCompiler GPU runner\n " );
128
131
@@ -136,6 +139,7 @@ int main(int argc, char **argv) {
136
139
srcMgr->AddNewSourceBuffer (std::move (file), SMLoc ());
137
140
MLIRContext mlirCtx{gc::initCompilerAndGetDialects ()};
138
141
auto mlirMod = parseSourceFile<ModuleOp>(srcMgr, {&mlirCtx});
142
+ std::cout << " PARSED SOURCE FILE" << std::endl;
139
143
findFunc (opts, *mlirMod);
140
144
141
145
gc::gpu::OclModuleBuilderOpts builderOpts;
@@ -154,8 +158,10 @@ int main(int argc, char **argv) {
154
158
};
155
159
156
160
gc::gpu::OclModuleBuilder builder{mlirMod, builderOpts};
161
+ std::cout << " CONSTRUCTED BUILDER" << std::endl;
157
162
auto runtime = gcGetOrReport (gc::gpu::OclRuntime::get ());
158
163
auto oclMod = gcGetOrReport (builder.build (runtime));
164
+ std::cout << " LOWERED MODULE" << std::endl;
159
165
assert (oclMod->isStatic );
160
166
161
167
if (!opts.objDumpFile .getValue ().empty ()) {
@@ -167,7 +173,9 @@ int main(int argc, char **argv) {
167
173
gc::gpu::OclContext ctx{runtime, queue};
168
174
gc::gpu::StaticExecutor<0 > exec{oclMod};
169
175
gcLogD (" Executing function " , opts.mainFuncName .c_str (), " ()" );
176
+ std::cout << " STARTING MODULE..." << std::endl;
170
177
exec (ctx);
178
+ std::cout << " MODULE DONE" << std::endl;
171
179
gcGetOrReport (ctx.finish ());
172
180
gcGetOrReport (runtime.releaseQueue (queue));
173
181
return 0 ;
0 commit comments