-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* updated v6.0 * MNT: Re-rendered with conda-build 24.5.1, conda-smithy 3.36.2, and conda-forge-pinning 2024.06.18.06.09.12 * rm patch * rm patch 2 * Revert "rm patch 2" This reverts commit 5fb52e8. * re-apply POLLRDHUP part of gh1392 patch * more pocld patches * adjust patch * adjust patch 2 * copy right bc files for CUDA * disable test_large_buf --------- Co-authored-by: Matthias Diener <[email protected]>
- Loading branch information
1 parent
f4c736e
commit 74f2753
Showing
12 changed files
with
82 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ macos_machine: | |
target_platform: | ||
- osx-64 | ||
zlib: | ||
- '1.2' | ||
- '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ macos_machine: | |
target_platform: | ||
- osx-64 | ||
zlib: | ||
- '1.2' | ||
- '1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,4 @@ macos_machine: | |
target_platform: | ||
- osx-arm64 | ||
zlib: | ||
- '1.2' | ||
- '1' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,164 +1,3 @@ | ||
From a7b707c80adbff86b7e66f5919875f8f40cc6af5 Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Wed, 17 Jan 2024 00:42:55 -0600 | ||
Subject: [PATCH 1/4] Fix ENABLE_LOADABLE_DRIVERS for remote | ||
|
||
--- | ||
include/pocl_cache.h | 1 + | ||
lib/CL/devices/devices.c | 12 ++++-------- | ||
lib/CL/devices/remote/remote.c | 3 ++- | ||
lib/CL/pocl_cl.h | 2 ++ | ||
lib/CL/pocl_intfn.h | 6 +++--- | ||
5 files changed, 12 insertions(+), 12 deletions(-) | ||
|
||
diff --git a/include/pocl_cache.h b/include/pocl_cache.h | ||
index c77f13e16d..41d0cdae54 100644 | ||
--- a/include/pocl_cache.h | ||
+++ b/include/pocl_cache.h | ||
@@ -64,6 +64,7 @@ int pocl_cache_write_spirv (char *spirv_path, | ||
const char *spirv_content, | ||
uint64_t file_size); | ||
|
||
+POCL_EXPORT | ||
int pocl_cache_write_generic_objfile (char *objfile_path, | ||
const char *objfile_content, | ||
uint64_t objfile_size); | ||
diff --git a/lib/CL/devices/devices.c b/lib/CL/devices/devices.c | ||
index 917486d3af..ce883d181c 100644 | ||
--- a/lib/CL/devices/devices.c | ||
+++ b/lib/CL/devices/devices.c | ||
@@ -100,9 +100,6 @@ | ||
|
||
#ifdef BUILD_REMOTE_CLIENT | ||
#include "remote/remote.h" | ||
-extern cl_int pocl_remote_setup_peer_mesh (); | ||
-// from remote/remote.c | ||
-extern const char *remote_device_name_ptr; | ||
#endif | ||
|
||
#define MAX_DEV_NAME_LEN 64 | ||
@@ -660,12 +657,11 @@ pocl_init_devices () | ||
|
||
++dev_index; | ||
} | ||
+ if (pocl_device_ops[i].post_init != NULL) | ||
+ { | ||
+ pocl_device_ops[i].post_init(&pocl_device_ops[i]); | ||
+ } | ||
} | ||
- | ||
-#ifdef BUILD_REMOTE_CLIENT | ||
- pocl_remote_setup_peer_mesh (); | ||
-#endif | ||
- | ||
first_init_done = 1; | ||
devices_active = 1; | ||
ERROR: | ||
diff --git a/lib/CL/devices/remote/remote.c b/lib/CL/devices/remote/remote.c | ||
index 42e9505cb3..c709b0d587 100644 | ||
--- a/lib/CL/devices/remote/remote.c | ||
+++ b/lib/CL/devices/remote/remote.c | ||
@@ -228,6 +228,7 @@ pocl_remote_init_device_ops (struct pocl_device_ops *ops) | ||
|
||
ops->probe = pocl_remote_probe; | ||
ops->init = pocl_remote_init; | ||
+ ops->post_init = pocl_remote_setup_peer_mesh; | ||
// ops->uninit = pocl_remote_uninit; | ||
// ops->reinit = pocl_remote_reinit; | ||
|
||
@@ -488,7 +489,7 @@ pocl_remote_init (unsigned j, cl_device_id device, const char *parameters) | ||
} | ||
|
||
cl_int | ||
-pocl_remote_setup_peer_mesh () | ||
+pocl_remote_setup_peer_mesh (struct pocl_device_ops *ops) | ||
{ | ||
return pocl_network_setup_peer_mesh (); | ||
} | ||
diff --git a/lib/CL/pocl_cl.h b/lib/CL/pocl_cl.h | ||
index d1e045acdd..9634f20900 100644 | ||
--- a/lib/CL/pocl_cl.h | ||
+++ b/lib/CL/pocl_cl.h | ||
@@ -434,6 +434,8 @@ struct pocl_device_ops { | ||
* parameters : optional environment with device-specific parameters | ||
*/ | ||
cl_int (*init) (unsigned j, cl_device_id device, const char *parameters); | ||
+ /* Device type initialization after all devices have been initialized */ | ||
+ cl_int (*post_init) (struct pocl_device_ops *ops); | ||
/* uninitializes the driver for a particular device. May free hardware resources. */ | ||
cl_int (*uninit) (unsigned j, cl_device_id device); | ||
/* reinitializes the driver for a particular device. Called after uninit; | ||
diff --git a/lib/CL/pocl_intfn.h b/lib/CL/pocl_intfn.h | ||
index ba4f0c7d69..030d505be2 100644 | ||
--- a/lib/CL/pocl_intfn.h | ||
+++ b/lib/CL/pocl_intfn.h | ||
@@ -35,9 +35,9 @@ extern "C" { | ||
POdeclsym(clBuildProgram) | ||
POdeclsym(clLinkProgram) | ||
POdeclsym(clCompileProgram) | ||
-POdeclsym(clCreateBuffer) | ||
+POdeclsymExport(clCreateBuffer) | ||
POdeclsym(clCreateCommandQueue) | ||
-POdeclsym(clCreateContext) | ||
+POdeclsymExport(clCreateContext) | ||
POdeclsym(clCreateContextFromType) | ||
POdeclsym(clCreateImage2D) | ||
POdeclsym(clCreateImage3D) | ||
@@ -93,7 +93,7 @@ POdeclsym(clGetKernelInfo) | ||
POdeclsym(clGetKernelArgInfo) | ||
POdeclsym(clGetKernelWorkGroupInfo) | ||
POdeclsym(clGetKernelSubGroupInfo) | ||
-POdeclsym(clGetMemObjectInfo) | ||
+POdeclsymExport(clGetMemObjectInfo) | ||
POdeclsym(clGetPlatformIDs) | ||
POdeclsym(clGetPlatformInfo) | ||
POdeclsym(clGetProgramBuildInfo) | ||
|
||
From 6c32cd52953b822a580a8aab31f80062013af99c Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Wed, 17 Jan 2024 00:43:53 -0600 | ||
Subject: [PATCH 2/4] Fix remote for Apple | ||
|
||
--- | ||
CMakeLists.txt | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 27a950e3cf..dd3eea02c5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -1079,7 +1079,7 @@ else() | ||
set(TESTS_USE_ICD 0) | ||
endif() | ||
|
||
-if (APPLE AND NOT ENABLE_ICD AND VISIBILITY_HIDDEN) | ||
+if (APPLE AND VISIBILITY_HIDDEN) | ||
add_compile_definitions("-DCL_API_CALL=__attribute__ ((visibility (\"default\")))") | ||
endif() | ||
|
||
|
||
From c053673eeb1a9ac3d17f397169602bf5c482fca4 Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Wed, 17 Jan 2024 00:43:09 -0600 | ||
Subject: [PATCH 3/4] Fix ENABLE_LOADABLE_DRIVERS for cuda | ||
|
||
--- | ||
lib/llvmopencl/LLVMUtils.h | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
diff --git a/lib/llvmopencl/LLVMUtils.h b/lib/llvmopencl/LLVMUtils.h | ||
index 014105c292..341c2987ed 100644 | ||
--- a/lib/llvmopencl/LLVMUtils.h | ||
+++ b/lib/llvmopencl/LLVMUtils.h | ||
@@ -68,6 +68,7 @@ void eraseFunctionAndCallers(llvm::Function *Function); | ||
|
||
bool isAutomaticLocal(llvm::Function *F, llvm::GlobalVariable &Var); | ||
|
||
+POCL_EXPORT | ||
bool isGVarUsedByFunction(llvm::GlobalVariable *GVar, llvm::Function *F); | ||
|
||
// Checks if the given argument of Func is a local buffer. | ||
|
||
From aa5595f8713bb5b5068b439b9a51d586d9fc4979 Mon Sep 17 00:00:00 2001 | ||
From: Isuru Fernando <[email protected]> | ||
Date: Wed, 17 Jan 2024 00:51:18 -0600 | ||
|
@@ -168,13 +7,13 @@ Subject: [PATCH 4/4] Fix typo | |
pocld/pocld.cc | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/pocld/pocld.cc b/pocld/pocld.cc | ||
diff --git a/pocld/daemon.cc b/pocld/daemon.cc | ||
index bd674cd148..efb81aa099 100644 | ||
--- a/pocld/pocld.cc | ||
+++ b/pocld/pocld.cc | ||
@@ -70,7 +70,7 @@ | ||
#endif | ||
--- a/pocld/daemon.cc | ||
+++ b/pocld/daemon.cc | ||
@@ -50,7 +50,7 @@ | ||
#include "daemon.hh" | ||
|
||
#ifndef POLLRDHUP | ||
-#define PULLRDHUP 0 | ||
+#define POLLRDHUP 0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
diff --git a/pocld/daemon.cc b/pocld/daemon.cc | ||
index bdf711cf8..f8aa50a1c 100644 | ||
--- a/pocld/daemon.cc | ||
+++ b/pocld/daemon.cc | ||
@@ -308,18 +308,25 @@ int PoclDaemon::launch(std::string ListenAddress, struct ServerPorts &Ports, | ||
addrinfo *ai = ResolvedAddress; | ||
NumListenFds = 0; | ||
for (addrinfo *ai = ResolvedAddress; ai; ai = ai->ai_next) { | ||
+#ifdef ENABLE_VSOCK | ||
if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6 && | ||
ai->ai_family != AF_VSOCK) | ||
continue; | ||
+#else | ||
+ if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) | ||
+ continue; | ||
+#endif | ||
struct sockaddr *base_addr = ai->ai_addr; | ||
int base_addrlen = ai->ai_addrlen; | ||
std::string addr_string = describe_sockaddr(base_addr, base_addrlen); | ||
+#ifdef ENABLE_VSOCK | ||
if (UseVsock && ai->ai_family != AF_VSOCK) { | ||
POCL_MSG_ERR("Using vsock requires using the correct address " | ||
"vsock:<cid>, instead of %s\n", | ||
addr_string.c_str()); | ||
break; | ||
} | ||
+#endif | ||
int listen_command_fd = 0; | ||
int listen_stream_fd = 0; | ||
struct sockaddr_storage server_addr_command, server_addr_stream; | ||
diff --git a/pocld/shared_cl_context.cc b/pocld/shared_cl_context.cc | ||
index 6bc358bbe..b1678af03 100644 | ||
--- a/pocld/shared_cl_context.cc | ||
+++ b/pocld/shared_cl_context.cc | ||
@@ -23,6 +23,7 @@ | ||
IN THE SOFTWARE. | ||
*/ | ||
|
||
+#include <unistd.h> | ||
#include <cassert> | ||
#include <cstdio> | ||
#include <filesystem> | ||
@@ -630,7 +631,7 @@ SharedCLContext::SharedCLContext(cl::Platform *p, unsigned pid, | ||
if (MaxMemAllocSize < MaxSVMAllocSize) | ||
MaxSVMAllocSize = MaxMemAllocSize; | ||
|
||
- MaxTotalAllocatableSVM = std::min(MaxTotalAllocatableSVM, | ||
+ MaxTotalAllocatableSVM = std::min(MaxTotalAllocatableSVM, (size_t) | ||
Dev.getInfo<CL_DEVICE_GLOBAL_MEM_SIZE>()); | ||
} | ||
|