-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove flagcx_hetero.cc and hostGpuMemAlloc.h (#7)
- Loading branch information
1 parent
83df87f
commit cb79eb3
Showing
11 changed files
with
91 additions
and
493 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include "launch_kernel.h" | ||
|
||
void cpuAsyncLaunch(void *_args){ | ||
struct hostLaunchArgs *args = (struct hostLaunchArgs *) _args; | ||
while(!args->stopLaunch); | ||
__atomic_store_n(&args->retLaunch, 1, __ATOMIC_RELAXED); | ||
} |
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,27 @@ | ||
#ifndef FLAGCX_LAUNCH_KERNEL_H_ | ||
#define FLAGCX_LAUNCH_KERNEL_H_ | ||
|
||
#include "topo.h" | ||
#include "debug.h" | ||
#include <stdlib.h> | ||
#include <getopt.h> | ||
#include <memory.h> | ||
#include <stdio.h> | ||
#include <math.h> | ||
#include <iostream> | ||
#include <iomanip> | ||
#include <unistd.h> | ||
#include <dlfcn.h> | ||
#include "adaptor.h" | ||
#include "utils.h" | ||
#include "param.h" | ||
|
||
struct hostLaunchArgs{ | ||
volatile bool stopLaunch; | ||
volatile bool retLaunch; | ||
}; | ||
|
||
void cpuAsyncLaunch(void *_args); | ||
|
||
#endif | ||
|
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 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#define CREATE_DEVICE_TOPO_API | ||
#include "topo.h" | ||
#include "debug.h" | ||
#include <stdlib.h> | ||
#include <getopt.h> | ||
#include <memory.h> | ||
#include <stdio.h> | ||
#include <math.h> | ||
#include <iostream> | ||
#include <iomanip> | ||
#include <unistd.h> | ||
#include <dlfcn.h> | ||
#include "adaptor.h" | ||
#include "utils.h" | ||
#include "param.h" | ||
|
||
using namespace std; | ||
|
||
struct flagcxDeviceAdaptor devRunTimeApi; | ||
|
||
void *dlsymCheck(void *handle, const char *funcName){ | ||
void *funcPtr = dlsym(handle, funcName); | ||
if(funcPtr == NULL) INFO(FLAGCX_INIT, "fail to load symbol %s", funcName); | ||
return funcPtr; | ||
} | ||
|
||
#define LOADSYMBOL(handle,api) do{ \ | ||
api = (typeof(api)) dlsymCheck(handle, #api); \ | ||
}while(0); | ||
|
||
flagcxResult_t loadDeviceSymbol(){ | ||
void *libHandle = dlopen("./libmylib.so", RTLD_LAZY); | ||
if(libHandle == nullptr){ | ||
const char* useNet = flagcxGetEnv("FLAGCX_USENET"); | ||
if(useNet == NULL){ | ||
INFO(FLAGCX_INIT, "fail to open libmylib.so"); | ||
return flagcxRemoteError; | ||
} | ||
return flagcxSuccess; | ||
} | ||
|
||
LOADSYMBOL(libHandle, flagcxTopoGetLocalNet); | ||
return flagcxSuccess; | ||
} | ||
|