How paras-ecosystem/paras-compiler works
ParaS is a SYCL 2020 compiler and runtime for portable CPU and NVIDIA GPU execution. The principal workflow is a developer invoking parascc on SYCL source, then running the resulting program on a supported device. The tree separates compiler-driver transformations, SYCL API types, and host/GPU execution backends. The excerpts show handler dispatch into GPU execution and threadpool command-group submission; many compiler and runtime implementation files were not sampled, so their internal call relationships are not asserted.
Main entry points: gpu_threadpool.hpp GPU threadpool · queue.hpp Queue API · handler.hpp Command handler · threadpool.hpp CPU threadpool
Components 17
Compiler frontend
- parascc driver
src/driver/driver.cpp - AST handlers
src/driver - Preprocessor
src/driver/Preprocessor.cpp
SYCL API
- Queue API
include/sycl/queue.hpp - Command handler
include/sycl/handler.hpp - Device and context
include/sycl/device.hpp - Work-item types
include/sycl/item.hpp - Range types
include/sycl/range.hpp
Execution backends
- CPU threadpool
include/kem/threadpool.hpp - Host group runtime
include/kem/host_group_runtime.hpp - GPU threadpool
include/kem_gpu/gpu_threadpool.hpp - GPU handler dispatch
include/kem_gpu/handler_impl.hpp - GPU range execution
include/kem_gpu/gpu_threadpool_execute_nd_range_1D.hpp
Device discovery
- GPU detection
src/pruntime_system/gpu_detection.cpp - Device runtime
src/pruntime_system/device.cpp
Other components
- SYCL developer
- NVIDIA CUDA
Connections 14
- SYCL developer → parascc driver: compiles source
README.md - parascc driver → SYCL developer: targets CPU/GPU
README.md - Queue API → Device and context: uses device APIs
include/sycl/queue.hpp - Queue API → Command handler: uses command handler
include/sycl/queue.hpp - Command handler → Work-item types: uses work items
include/sycl/handler.hpp - Command handler → Range types: uses ranges
include/sycl/handler.hpp - CPU threadpool → Queue API: constructs from queue
include/kem/threadpool.hpp - CPU threadpool → Command handler: runs command group
include/kem/threadpool.hpp - GPU threadpool → Queue API: creates queue pool
include/kem_gpu/gpu_threadpool.hpp - GPU handler dispatch → GPU threadpool: dispatches kernels
include/kem_gpu/handler_impl.hpp - GPU threadpool → GPU range execution: uses range executor
include/kem_gpu/gpu_threadpool.hpp - Device runtime → GPU detection: uses GPU detection
src/pruntime_system/device.cpp - GPU detection → Device runtime: queries device APIs
src/pruntime_system/gpu_detection.cpp - GPU threadpool → NVIDIA CUDA: executes on
README.md