Fix performance bug and base pointer offset

This commit is contained in:
Olli Saarikivi
2023-05-03 19:40:23 +00:00
parent 39666f999f
commit 4a41c19e72
5 changed files with 44 additions and 34 deletions

View File

@@ -16,7 +16,10 @@ struct TransportInfo
// TODO: rewrite this using std::variant or something
bool ibLocal;
union {
cudaIpcMemHandle_t cudaIpcHandle;
struct {
cudaIpcMemHandle_t cudaIpcBaseHandle;
size_t cudaIpcOffsetFromBase;
};
struct {
const IbMr* ibMr;
IbMrInfo ibMrInfo;
@@ -27,9 +30,9 @@ struct TransportInfo
struct RegisteredMemory::Impl
{
void* data;
bool dataInitialized;
size_t size;
int rank;
uint64_t hostHash;
TransportFlags transports;
std::vector<TransportInfo> transportInfos;