Skip to content

Conversation

@kr-2003
Copy link
Contributor

@kr-2003 kr-2003 commented Sep 20, 2025

This PR enables Out-Of-Process Interpreter for CppInterOp.

Under the hood, it uses LLVM's llvm-jitlink-executor and lib ORC RT to delegate the JIT execution to different process. The user just needs to pass --use-oop-jit flag as ClangArgs while constructing the interpreter to use this feature.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 10 out of 16. Check the log or trigger a new build to see more.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@mcbarton
Copy link
Collaborator

Before pushing commits to this PR please either ping me, or delete caches as they are made. This PR has caused a large number of llvm cached builds to be deleted on main, which in turn has required multiple PRs workflow runs to be stopped while the cache is rebuilt.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@codecov
Copy link

codecov bot commented Oct 2, 2025

Codecov Report

❌ Patch coverage is 73.45133% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.56%. Comparing base (1f43b4e) to head (a615546).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/CppInterOp/CppInterOpInterpreter.h 73.07% 14 Missing ⚠️
lib/CppInterOp/CppInterOp.cpp 74.35% 10 Missing ⚠️
lib/CppInterOp/Compatibility.h 72.72% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
- Coverage   79.83%   79.56%   -0.28%     
==========================================
  Files           9        9              
  Lines        3963     4057      +94     
==========================================
+ Hits         3164     3228      +64     
- Misses        799      829      +30     
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/Compatibility.h 88.54% <72.72%> (-3.49%) ⬇️
lib/CppInterOp/CppInterOp.cpp 87.74% <74.35%> (-0.30%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 85.12% <73.07%> (-3.48%) ⬇️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/Compatibility.h 88.54% <72.72%> (-3.49%) ⬇️
lib/CppInterOp/CppInterOp.cpp 87.74% <74.35%> (-0.30%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 85.12% <73.07%> (-3.48%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please look at the comments.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

@mcbarton
Copy link
Collaborator

mcbarton commented Oct 5, 2025

Codecov Report

❌ Patch coverage is 74.33628% with 29 lines in your changes missing coverage. Please review. ✅ Project coverage is 80.45%. Comparing base (fe3de3c) to head (cfbb303).
Files with missing lines Patch % Lines
lib/CppInterOp/CppInterOpInterpreter.h 67.39% 15 Missing ⚠️
lib/CppInterOp/Compatibility.h 58.62% 12 Missing ⚠️
lib/CppInterOp/CppInterOp.cpp 94.73% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #717      +/-   ##
==========================================
- Coverage   81.03%   80.45%   -0.59%     
==========================================
  Files           9        9              
  Lines        4214     4307      +93     
==========================================
+ Hits         3415     3465      +50     
- Misses        799      842      +43     

Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 88.67% <94.73%> (-0.13%) ⬇️
lib/CppInterOp/Compatibility.h 77.53% <58.62%> (-14.50%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.89% <67.39%> (-4.19%) ⬇️
Files with missing lines Coverage Δ
include/CppInterOp/CppInterOp.h 95.55% <ø> (ø)
lib/CppInterOp/CppInterOp.cpp 88.67% <94.73%> (-0.13%) ⬇️
lib/CppInterOp/Compatibility.h 77.53% <58.62%> (-14.50%) ⬇️
lib/CppInterOp/CppInterOpInterpreter.h 83.89% <67.39%> (-4.19%) ⬇️
🚀 New features to boost your workflow:

The tests are not covering over 1/4 of this patch. @kr-2003 can you improve the coverage?

Copy link
Collaborator

@Vipul-Cariappa Vipul-Cariappa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments. I guess everything else is fine. Please also look at the github-actions's comments.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions


if (NOT EMSCRIPTEN)
set(EXTRA_TEST_SOURCE_FILES "")
set(EXTRA_TEST_SOURCE_FILES Utils.cpp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why we add this line on top and the same here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason it was reset to nothing previously was to stop the cuda tests being run twice. Given Utils.cpp is needed unconditionally then its not needed in EXTRA_TEST_SOURCE_FILES . Utils.cpp should just be included in both lists of test files, and anything which changed EXTRA_TEST_SOURCE_FILES should be reverted.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

bool use_oop_jit;

TestConfig(bool oop_jit, const std::string& n)
: name(std::move(n)), use_oop_jit(oop_jit) {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: std::move of the const variable 'n' has no effect; remove std::move() or make the variable non-const [performance-move-const-arg]

Suggested change
: name(std::move(n)), use_oop_jit(oop_jit) {}
: name(n), use_oop_jit(oop_jit) {}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants