Skip to content

add worklist sorting to support nested specializations - #513

Open
jandrej wants to merge 7 commits into
mainfrom
nested-jit
Open

add worklist sorting to support nested specializations#513
jandrej wants to merge 7 commits into
mainfrom
nested-jit

Conversation

@jandrej

@jandrej jandrej commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

addresses #512

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.04762% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/include/proteus/impl/JitEngineDevice.h 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@jandrej jandrej changed the title add worklist sorting to support nested specializations for cpu add worklist sorting to support nested specializations Aug 26, 2026

@johnbowen42 johnbowen42 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Once we remove the nested device compilation support (which I think is already supported), this will be good to merge in

void **KernelArgs, uint64_t ShmemSize, void *Stream);

extern "C" proteus::DeviceTraits<JitDeviceImplT>::DeviceError_t
__proteus_launch_kernel_by_name(const char *KernelLookupKey, dim3 GridDim,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's avoid duplicating the interface for the nested device case. I think if we pull this out, we will be ready to go.


extern "C" unsigned __cudaPushCallConfiguration(dim3 GridDim, dim3 BlockDim,
size_t SharedMem, void *Stream);
extern "C" cudaError_t __cudaPopCallConfiguration(dim3 *GridDim, dim3 *BlockDim,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove

}
#endif

#if PROTEUS_ENABLE_CUDA

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remove all this as well while taking out the device change

Comment thread src/pass/ProteusPass.cpp
// Post-order over the nesting relation, so an inner JIT function is always
// processed before the ones containing it. Recursion through JIT functions
// has no innermost region, so a cycle keeps its original relative order.
SmallVector<JitWorkListEntry *, 16> sortJitWorkListInnermostFirst(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this topological ordering is a good change as well to make sure we have a deterministic ordering

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.

2 participants