Skip to content

Commit

Permalink
feat(compiler/python): expose memory usage in bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
youben11 committed Aug 7, 2023
1 parent eb9e646 commit b7e1fe2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ void mlir::concretelang::python::populateCompilerAPISubmodule(
"crt_decompositions_of_outputs",
&mlir::concretelang::CompilationFeedback::crtDecompositionsOfOutputs)
.def_readonly("statistics",
&mlir::concretelang::CompilationFeedback::statistics);
&mlir::concretelang::CompilationFeedback::statistics)
.def_readonly(
"memory_usage_per_location",
&mlir::concretelang::CompilationFeedback::memoryUsagePerLoc);

pybind11::class_<mlir::concretelang::JitCompilationResult>(
m, "JITCompilationResult");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def __init__(self, compilation_feedback: _CompilationFeedback):
compilation_feedback.crt_decompositions_of_outputs
)
self.statistics = compilation_feedback.statistics
self.memory_usage_per_location = compilation_feedback.memory_usage_per_location

super().__init__(compilation_feedback)

Expand Down

0 comments on commit b7e1fe2

Please sign in to comment.