Manage runtime environments (#452)

* Add `Env` class that manages all runtime environments.
* Changed `NPKIT_DUMP_DIR` to `MSCCLPP_NPKIT_DUMP_DIR`.
This commit is contained in:
Changho Hwang
2025-01-15 09:44:52 -08:00
committed by GitHub
parent 8ac50dc85d
commit 869cdba00c
19 changed files with 229 additions and 51 deletions

View File

@@ -5,6 +5,7 @@
#include <unistd.h>
#include <iostream>
#include <mscclpp/env.hpp>
#include <mscclpp/executor.hpp>
#include <mscclpp/npkit/npkit.hpp>
#include <mscclpp/utils.hpp>
@@ -109,7 +110,7 @@ int main(int argc, char* argv[]) {
const std::string executionPlanPath = argv[2];
const int niters = std::stoi(argv[3]);
const int ngraphIters = std::stoi(argv[4]);
const char* npkitDumpDir = getenv("NPKIT_DUMP_DIR");
const char* npkitDumpDir = mscclpp::env()->npkitDumpDir.c_str();
mscclpp::PacketType packetType = mscclpp::PacketType::LL16;
if (argc == 6) {
packetType = parsePacketType(argv[5]);