Skip to content

Commit

Permalink
Portability for setenv.
Browse files Browse the repository at this point in the history
  • Loading branch information
alliepiper committed Apr 4, 2024
1 parent 868d951 commit d77f335
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nvbench/main.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@
static int _nvbench_env [[maybe_unused]] = []() -> int
{
// See NVIDIA/NVBench#136
#ifdef _MSC_VER
int retval = _putenv_s("CUDA_MODULE_LOADING", "EAGER");
#else
int retval = setenv("CUDA_MODULE_LOADING", "EAGER", 1);
#endif
return retval;
}();

Expand Down

0 comments on commit d77f335

Please sign in to comment.