COMPILE ERROR: failed to create pipeline OptiX with no further information in logs

I’m running Windows 11 pro, desktop Nvidia RTX 2070 super with 8GBs of memory, GeForce game ready driver 511.79, OptiX 7.4.0, CUDA v11.6.
I’ve used default compile options:

#define CUDA_NVRTC_OPTIONS  \
  "-std=c++11", \
  "-arch", \
  "compute_50", \
  "-use_fast_math", \
  "-lineinfo", \
  "-default-device", \
  "-rdc", \
  "true", \
  "-D__x86_64",

plus the includes:

#define RELATIVE_INCLUDE_DIRS \
  ".", 
#define ABSOLUTE_INCLUDE_DIRS \
  "C:/ProgramData/NVIDIA Corporation/OptiX SDK 7.4.0/include", \
  "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.6/include", 

I’ve tried turning on validation mode, the CUDA error 700 emerged:

[ 2][COMPILE FEEDBACK]: COMPILE ERROR: failed to create pipeline
Error releasing namedConstant's internal resources (CUDA error string: an illegal memory access was encountered, CUDA error code: 700)
Info: Pipeline has 1 module(s), 2 entry function(s), 0 trace call(s), 0 continuation callable call(s), 0 direct callable call(s), 2 basic block(s) in entry functions, 2 instruction(s) in entry functions, 7 non-entry function(s), 53 basic block(s) in non-entry functions, 627 instruction(s) in non-entry functions

Might’ve guessed there’s an issue with my sloppy memory management, but why is it emerging only when creating the pipeline? I’ve reduced the .cu code to


#include <optix.h>
#include "optixSettings.h"


extern "C"
{
	__constant__ Params params;
}

//raygen function to generate new rays
extern "C" __global__ void __raygen__rg() {

}

extern "C" __global__ void __miss__ms() {
	optixSetPayload_0(1);
}

The resulting .ptx is
programs.ptx (1.1 KB)
I’m also including my whole optix code class
raytracerC.cpp (14.7 KB)
raytracerC.h (901 Bytes)
Still the issue persists. The program pipeline creation should reference only the optix context and ptx file, there’s no way it could fail because of previous GAS build or registering opengl buffers to CUDA, right?