-
Notifications
You must be signed in to change notification settings - Fork 6
WIP: Adding Sycl Support to CYK Calculations #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
9b01f2d
7463937
0245d2d
b41d62c
34d8f6f
15b0d26
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ | |
#include <vector> | ||
#include <list> | ||
#include <string> | ||
#include "statement.hh" | ||
|
||
static const char *MUTEX = "mutex"; | ||
static const char *VARNAME_OuterLoop1 = "outer_loop_1_idx"; | ||
|
@@ -1299,7 +1300,28 @@ Fn_Def *print_CYK(const AST &ast) { | |
} | ||
} | ||
} | ||
fn_cyk->stmts.push_back(new Statement::CustomCode("#pragma omp parallel")); | ||
|
||
int dimension = 1; | ||
std::string name = "test"; | ||
Statement::Var_Decl *value = new Statement::Var_Decl( | ||
new Type::String, "test_value"); | ||
|
||
fn_cyk->stmts.push_back( | ||
new Statement::SYCL_Buffer_Decl(new Type::Int, dimension, value, value)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if you are going to use such a statement, don't you have to include according cycl/cycl.hpp header files?! The currently failing tests point to exactly these headers being absent. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We furthermore might want to think about a user switch/flag to decide if generated code shall contain sycl "extensions" or not?! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this is the plan for this week, implementing headers and the proper loop |
||
|
||
Statement::Var_Decl *queue = new Statement::Var_Decl( | ||
new Type::External("sycl::queue"), "q"); | ||
|
||
fn_cyk->stmts.push_back(queue); | ||
|
||
Statement::SYCL_Submit_Kernel *blk_sycl = new Statement::SYCL_Submit_Kernel( | ||
queue, new Statement::Var_Decl( | ||
new Type::External("sycl::handler&"), "cgh")); | ||
|
||
bool* test = new bool(true); | ||
blk_sycl->statements.push_back( | ||
new Statement::SYCL_Accessor_Decl(value, value, test, test)); | ||
|
||
Statement::Block *blk_parallel = new Statement::Block(); | ||
|
||
if (ast.checkpoint && ast.checkpoint->cyk) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.