forked from AliceO2Group/AliceO2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve scheduling, benchmarking, and config
- Loading branch information
Showing
6 changed files
with
113 additions
and
77 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 |
---|---|---|
|
@@ -17,6 +17,7 @@ | |
|
||
#include <thread> | ||
#include <vector> | ||
#include <atomic> | ||
|
||
namespace o2 | ||
{ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,13 +9,17 @@ | |
// granted to it by virtue of its status as an Intergovernmental Organization | ||
// or submit itself to any jurisdiction. | ||
|
||
/// \brief Helper interface to the GPU device, meant to be compatible with manual allocation/streams and GPUReconstruction ones. | ||
/// \author [email protected] | ||
|
||
#ifdef __HIPCC__ | ||
#include "hip/hip_runtime.h" | ||
#else | ||
#include <cuda.h> | ||
#endif | ||
|
||
#include <iostream> | ||
#include <cstdlib> | ||
|
||
#include "DeviceInterface/GPUInterface.h" | ||
|
||
|
@@ -75,7 +79,8 @@ GPUInterface* GPUInterface::sGPUInterface = nullptr; | |
GPUInterface* GPUInterface::Instance() | ||
{ | ||
if (sGPUInterface == nullptr) { | ||
sGPUInterface = new GPUInterface(8); // FIXME: get some configurable param to do so. | ||
const auto* envValue = std::getenv("GPUINTERFACE_NSTREAMS"); | ||
sGPUInterface = new GPUInterface(envValue == nullptr ? 8 : std::stoi(envValue)); | ||
} | ||
return sGPUInterface; | ||
} | ||
|
Oops, something went wrong.