[llvm] [Offload] Implement the remaining initial Offload API (PR #122106)

Callum Fare via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 08:30:17 PST 2025


================
@@ -0,0 +1,82 @@
+//===-- Enqueue.td - Enqueue definitions for Offload -------*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file contains Offload API definitions related to enqueable operations
+//
+//===----------------------------------------------------------------------===//
+
+def : Function {
+    let name = "olEnqueueDataWrite";
----------------
callumfare wrote:

There's no particular reason other than the names are based on the matching functions in the plugin interface (substituting read/write for submit/retrieve). The 'enqueue' also makes it clear it's asynchronous rather than a blocking write. This is just personal preference though, I don't have strong opinions, happy to change the names to whatever people think is best.

We discussed the camelCase vs snake_case on the first PR. We slightly leaned towards the former since it seemed to be more common in C APIs (CUDA, OpenCL, etc). Again this is something that we can change though.

https://github.com/llvm/llvm-project/pull/122106


More information about the llvm-commits mailing list