Skip to content

Commit

Permalink
cpu: remove hidden driver api functions, rename sched to gsched to av…
Browse files Browse the repository at this point in the history
…oid naming conflicts

Signed-off-by: Niklas Eiling <[email protected]>
  • Loading branch information
n-eiling committed Jun 14, 2022
1 parent 7e47513 commit d0cc5c3
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
5 changes: 3 additions & 2 deletions cpu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ SRC_SERVER = $(RPC_XDR) \
api-recorder.c \
resource-mg.c \
cr.c \
sched_none.c
gsched_none.c

SRC_SERVER_LIB = server-library.c
SRC_SERVER_EXE = server-exe.c
Expand All @@ -48,12 +48,13 @@ SRC_CLIENT = $(RPC_XDR) \
cpu-utils.c \
cpu-client-runtime.c \
cpu-client-driver.c \
cpu-client-driver-hidden.c \
list.c \
log.c \
cpu-libwrap.c \
cpu-client-cusolver.c

# cpu-client-driver-hidden.c \
ifdef WITH_IB
SRC_SERVER += cpu-ib.c
SRC_CLIENT += cpu-ib.c
Expand Down
4 changes: 2 additions & 2 deletions cpu/cpu-client-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ DEF_FN(CUresult, cuGraphicsResourceSetMapFlags, CUgraphicsResource, resource, un
//DEF_FN(CUresult, cuGetExportTable, const void**, ppExportTable, const CUuuid*, pExportTableId)

// This function returns an array of 8 function pointers to hidden functions inside libcuda.so
CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId)
/*CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId)
{
enum clnt_stat retval;
char *uuid = NULL;
Expand Down Expand Up @@ -644,7 +644,7 @@ CUresult cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTable
cd_client_hidden_incr();
return result.err;
}
}*/
DEF_FN(CUresult, cuOccupancyMaxActiveBlocksPerMultiprocessor, int*, numBlocks, CUfunction, func, int, blockSize, size_t, dynamicSMemSize)
DEF_FN(CUresult, cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, int*, numBlocks, CUfunction, func, int, blockSize, size_t, dynamicSMemSize, unsigned int, flags)
DEF_FN(CUresult, cuMemAdvise, CUdeviceptr, devPtr, size_t, count, CUmem_advise, advice, CUdevice, device)
Expand Down
2 changes: 1 addition & 1 deletion cpu/cpu-server-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "resource-mg.h"
#define WITH_RECORDER
#include "api-recorder.h"
#include "sched.h"
#include "gsched.h"

int server_driver_init(int restore)
{
Expand Down
2 changes: 1 addition & 1 deletion cpu/cpu-server.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#endif //WITH_IB
#define WITH_RECORDER
#include "api-recorder.h"
#include "sched.h"
#include "gsched.h"

INIT_SOCKTYPE

Expand Down
6 changes: 3 additions & 3 deletions cpu/cpu_rpc_prot.x
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ program RPC_CD_PROG {
int rpc_cuCtxSetCurrent(ptr) = 1011;
ptr_result rpc_cuDevicePrimaryCtxRetain(int) = 1012;
ptr_result rpc_cuModuleGetFunction(ptr, string) = 1013;
ptr_result rpc_cuGetExportTable(string) = 1014;
/* ptr_result rpc_cuGetExportTable(string) = 1014;*/
ptr_result rpc_cuMemAlloc(ptr) = 1015;
int_result rpc_cuCtxGetDevice(void) = 1016;
int rpc_cuMemcpyHtoD(ptr, mem_data) = 1017;
Expand All @@ -322,14 +322,14 @@ program RPC_CD_PROG {
int rpc_cuModuleUnload(ptr) = 1021;

/* HIDDEN DRIVER API */
ptr_result rpc_hidden_get_device_ctx(int) = 1101;
/* ptr_result rpc_hidden_get_device_ctx(int) = 1101;
ptr_result rpc_hidden_get_module(ptr, ptr, ptr, int) = 1105;
ptr_result rpc_hidden_1_1(void) = 1111;
void rpc_hidden_1_3(ptr, ptr) = 1113;
ptr_result rpc_hidden_1_5(void) = 1115;
void rpc_hidden_2_1(ptr) = 1121;
int rpc_hidden_3_0(int, ptr, ptr) = 1130;
mem_result rpc_hidden_3_2(int, ptr) = 1132;
mem_result rpc_hidden_3_2(int, ptr) = 1132;*/

/* CUSOLVER */
ptr_result rpc_cusolverDnCreate(void) = 2001;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cpu/sched_none.c → cpu/gsched_none.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "sched.h"
#include "gsched.h"
#include "log.h"
#include "list.h"
#include <pthread.h>
Expand Down

0 comments on commit d0cc5c3

Please sign in to comment.