Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens the isolated benchmark runner by moving benchmark configuration (signature/seed/repeats) out of Python function arguments and into a runner-controlled pipe read by the C++ layer before untrusted code is imported/executed.
Changes:
- Replace Python→C++ argument passing of
seed/repeatswith a pipe-fed config parsed in C++ (read_benchmark_parameters). - Update the nanobind
do_benchbinding and Python subprocess target accordingly. - Add
BenchmarkResult.successand update the grayscale test script to use it.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
test/grayscale.py |
Switches success indicator logic to use BenchmarkResult.success. |
python/pygpubench/__init__.py |
Moves config into a pipe, renames bench impl to private, and adds BenchmarkResult.success. |
csrc/manager.h |
Introduces BenchmarkParameters and updates BenchmarkManager constructor signature. |
csrc/manager.cpp |
Implements pipe config parsing and triggers gc.collect() before importing untrusted kernel code. |
csrc/binding.cpp |
Updates the nanobind binding signature to accept an input fd and read config in C++. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3de0205 to
8e657c0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
make test seed invisible on the python stack