srdatalog¶
srdatalog — Python frontend with JIT C++/CUDA codegen.
Drives the full pipeline in Python — DSL → MIR → emit C++ → compile → dlopen — without depending on Nim or xmake. The bundled runtime headers + the bundled vendor deps + auto-detected CUDA are everything the compile needs.
Public API. Typical use:
from srdatalog import (
Var, Relation, Program, build_project,
CompilerConfig, build_and_load, EntryPoint,
)
from srdatalog.runtime import (
runtime_include_paths, cuda_include_paths, runtime_defines,
)
prog = Program(rules=[...]) # relations auto-derived from rule atoms
project = build_project(prog, project_name="MyPlan", cache_base="./build")
cfg = CompilerConfig(
include_paths=runtime_include_paths() + cuda_include_paths(),
defines=runtime_defines(),
)
runtime = build_and_load(project, entry_points=[
EntryPoint("srdatalog_init"),
EntryPoint("srdatalog_run"),
], compiler_config=cfg)
runtime.srdatalog_init()
runtime.srdatalog_run(b"/path/to/data")
See README + examples/triangle.py.
Subpackages¶
Submodules¶
Package Contents¶
Data¶
API¶
- srdatalog.__all__¶
[‘Var’, ‘Relation’, ‘Program’, ‘compile_to_hir’, ‘compile_to_mir’, ‘gen_main_file_content’, ‘gen_sch…
- srdatalog.__version__¶
‘0.2.0.dev0’