[Beignet] [PATCH 13/19] OCL20: add ir register enqueuebufptr for enqueue global buffer.
Yang Rong
rong.r.yang at intel.com
Mon Nov 28 11:32:39 UTC 2016
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
Reviewed-by: Pan Xiuli <xiuli.pan at intel.com>
---
backend/src/backend/program.h | 9 ++++++++-
backend/src/ir/profile.cpp | 3 ++-
backend/src/ir/profile.hpp | 3 ++-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/backend/src/backend/program.h b/backend/src/backend/program.h
index 6373282..e601c97 100644
--- a/backend/src/backend/program.h
+++ b/backend/src/backend/program.h
@@ -116,6 +116,7 @@ enum gbe_curbe_type {
GBE_CURBE_THREAD_ID,
GBE_CURBE_CONSTANT_ADDRSPACE,
GBE_CURBE_STACK_SIZE,
+ GBE_CURBE_ENQUEUE_BUF_POINTER,
GBE_GEN_REG,
};
@@ -301,6 +302,9 @@ extern gbe_program_get_kernel_by_name_cb *gbe_program_get_kernel_by_name;
typedef gbe_kernel (gbe_program_get_kernel_cb)(gbe_program, uint32_t ID);
extern gbe_program_get_kernel_cb *gbe_program_get_kernel;
+typedef const char* (gbe_program_get_device_enqueue_kernel_name_cb)(gbe_program, uint32_t ID);
+extern gbe_program_get_device_enqueue_kernel_name_cb *gbe_program_get_device_enqueue_kernel_name;
+
/*! Get the kernel name */
typedef const char *(gbe_kernel_get_name_cb)(gbe_kernel);
extern gbe_kernel_get_name_cb *gbe_kernel_get_name;
@@ -373,9 +377,12 @@ extern gbe_kernel_use_slm_cb *gbe_kernel_use_slm;
/*! Get slm size needed for kernel local variables */
typedef int32_t (gbe_kernel_get_slm_size_cb)(gbe_kernel);
extern gbe_kernel_get_slm_size_cb *gbe_kernel_get_slm_size;
-
+/*! Get the kernel's opencl version. */
typedef uint32_t (gbe_kernel_get_ocl_version_cb)(gbe_kernel);
extern gbe_kernel_get_ocl_version_cb *gbe_kernel_get_ocl_version;
+/* Kernel use device enqueue or not. */
+typedef uint32_t (gbe_kernel_use_device_enqueue_cb)(gbe_kernel);
+extern gbe_kernel_use_device_enqueue_cb *gbe_kernel_use_device_enqueue;
/*mutex to lock global llvmcontext access.*/
extern void acquireLLVMContextLock();
diff --git a/backend/src/ir/profile.cpp b/backend/src/ir/profile.cpp
index dbd2599..212af0d 100644
--- a/backend/src/ir/profile.cpp
+++ b/backend/src/ir/profile.cpp
@@ -50,7 +50,7 @@ namespace ir {
"profiling_timestamps4",
"threadid",
"constant_addrspace_start",
- "stack_size"
+ "stack_size", "enqueue_buffer_pointer",
};
#if GBE_DEBUG
@@ -107,6 +107,7 @@ namespace ir {
DECL_NEW_REG(FAMILY_DWORD, threadid, 1, GBE_CURBE_THREAD_ID);
DECL_NEW_REG(FAMILY_QWORD, constant_addrspace, 1, GBE_CURBE_CONSTANT_ADDRSPACE);
DECL_NEW_REG(FAMILY_QWORD, stacksize, 1, GBE_CURBE_STACK_SIZE);
+ DECL_NEW_REG(FAMILY_QWORD, enqueuebufptr, 1, GBE_CURBE_ENQUEUE_BUF_POINTER);
}
#undef DECL_NEW_REG
diff --git a/backend/src/ir/profile.hpp b/backend/src/ir/profile.hpp
index 3494beb..ebd5142 100644
--- a/backend/src/ir/profile.hpp
+++ b/backend/src/ir/profile.hpp
@@ -81,7 +81,8 @@ namespace ir {
static const Register threadid = Register(37); // the thread id of this thread.
static const Register constant_addrspace = Register(38); // starting address of program-scope constant
static const Register stacksize = Register(39); // stack buffer total size
- static const uint32_t regNum = 40; // number of special registers
+ static const Register enqueuebufptr = Register(40); // enqueue buffer address .
+ static const uint32_t regNum = 41; // number of special registers
extern const char *specialRegMean[]; // special register name.
} /* namespace ocl */
--
2.1.4
More information about the Beignet
mailing list