[llvm] [offload][SYCL] Add Module splitting by categories. (PR #131347)
Arvind Sudarsanam via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 07:53:25 PDT 2025
================
@@ -22,21 +22,23 @@ namespace llvm {
class Module;
class Function;
-namespace sycl {
-
-/// FunctionCategorizer returns integer category for the given Function.
-/// Otherwise, it returns std::nullopt if function doesn't have a category.
-using FunctionCategorizer = function_ref<std::optional<int>(const Function &F)>;
-
-using PostSplitCallbackType = function_ref<void(std::unique_ptr<Module> Part)>;
-
-/// Splits the given module \p M.
-/// Every split image is being passed to \p Callback for further possible
+/// Splits the given module \p M using the given \p FunctionCategorizer.
----------------
asudarsa wrote:
Based on discussion with @maksimsab, I got some clarity. Function category is something that users/developers can specify. In the current implementation, there are two categories specified: (1) Category based on module-id. (2) Category based on kernels. Other categories can be added if need be.
Thanks
https://github.com/llvm/llvm-project/pull/131347
More information about the llvm-commits
mailing list