-
Notifications
You must be signed in to change notification settings - Fork 122
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
Init commit for sql dialect #319
base: main
Are you sure you want to change the base?
Conversation
lib/sql/Dialect.cpp
Outdated
@@ -0,0 +1,27 @@ | |||
//===- PolygeistDialect.cpp - Polygeist dialect ---------------*- C++ -*-===// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to sql?
@@ -0,0 +1,40 @@ | |||
//===- PolygeistOps.cpp - BFV dialect ops ---------------*- C++ -*-===// | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to sql?
%q = "sql.select"() {column = ["data"], table = "mytable"} : () -> index | ||
%h = "sql.execute"(%q) : (index) -> index | ||
%res = "sql.get_result"(%h, %c0) {column = "data"} : (index, index) -> i32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this to work, you need to call allowUnknonwnOperations
in the dialect initializer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that needed? These operations are registered in the dialect?
Including
|
CMakeLists.txt
Outdated
@@ -1,110 +0,0 @@ | |||
cmake_minimum_required(VERSION 3.10) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave this file
@@ -73,7 +73,9 @@ | |||
#include <fstream> | |||
|
|||
#include "polygeist/Dialect.h" | |||
#include "sql/SQLDialect.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have these inside of #ifdef ENABLE_SQL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're going to need to in cmake, if enable_sql then add an enable sql in c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(see POLYGEIST_ENABLE_CUDA for an example)
No description provided.