Legate.jl
Loading...
Searching...
No Matches
task.h
Go to the documentation of this file.
1/* Copyright 2025 Northwestern University,
2 * Carnegie Mellon University University
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Author(s): David Krasowska <krasow@u.northwestern.edu>
17 * Ethan Meitz <emeitz@andrew.cmu.edu>
18 */
19
20#pragma once
21
22#include "jlcxx/jlcxx.hpp"
23#include "legate.h"
24
25namespace ufi {
26enum TaskIDs {
27 // max local task ID for custom library
28 // for some reason cupynumeric can have larger IDs? Not sure why.
30#if LEGATE_DEFINED(LEGATE_USE_CUDA)
31 JULIA_CUSTOM_GPU_TASK = 1022,
32#endif
33};
34
35class JuliaCustomTask : public legate::LegateTask<JuliaCustomTask> {
36 public:
37 static inline const auto TASK_CONFIG =
38 legate::TaskConfig{legate::LocalTaskID{ufi::JULIA_CUSTOM_TASK}};
39
40 static void cpu_variant(legate::TaskContext context);
41};
42
43#if LEGATE_DEFINED(LEGATE_USE_CUDA)
44class JuliaCustomGPUTask : public legate::LegateTask<JuliaCustomGPUTask> {
45 public:
46 static inline const auto TASK_CONFIG =
47 legate::TaskConfig{legate::LocalTaskID{ufi::JULIA_CUSTOM_GPU_TASK}};
48
49 static void gpu_variant(legate::TaskContext context);
50};
51#endif
52
53} // namespace ufi
54
55void wrap_ufi(jlcxx::Module& mod);
Definition task.h:35
static const auto TASK_CONFIG
Definition task.h:37
static void cpu_variant(legate::TaskContext context)
Definition task.cpp:250
Definition task.cpp:30
TaskIDs
Definition task.h:26
@ JULIA_CUSTOM_TASK
Definition task.h:29
void wrap_ufi(jlcxx::Module &mod)
Definition task.cpp:268