Questions tagged [cuda-context]

A CUDA context hold state information for controlling computational work on a CUDA device, including memory allocations, loaded modules of code, memory region mappings etc.

46 questions
1
vote
1 answer

create cuda context manager failed

I'm implementing fluid simulator using PhysiX. Unfortunately sth is wrong with cuda context manager and I have a problem with recognizing what it is. I have an init method which looks like this: void InitializePhysX() { bool…
aerion
  • 702
  • 1
  • 11
  • 28
1
vote
1 answer

Why does cuCtxCreate return old context?

i have installed: CUDA sdk 4.2 64, CUDA toolkit 4.2 64, CUDA devdriver 4.2 64, I checked every nvcuda.dll in \windows - all of them, are 4.2 version, but when i create a context with driver api and check it verison with cuCtxGetApiVersion - it…
ShPavel
  • 962
  • 1
  • 10
  • 17
1
vote
1 answer

How to use the context created by the runtime API from the driver API

A library that I link to uses the cuda runtime API. Thus it implicitly creates a cuda context when first calling a cuda function. My code (that uses the library) should use the driver API. Now, how can i get both (runtime and driver API) to work at…
ritter
  • 7,447
  • 7
  • 51
  • 84
0
votes
0 answers

Are pools and pool-allocated memory CUDA-context-specific?

Typical CUDA memory allocations - e.g. using cuMemAlloc() are specific to the current CUDA (driver) context. Is this also true for memory pools? Perhaps for allocations from pools? The driver API for memory pools explicitly mentions devices, but not…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
0 answers

Do CUDA 3D memory copy parameters need to be kept alive?

Consider the CUDA API function CUresult cuMemcpy3DAsync (const CUDA_MEMCPY3D* pCopy, CUstream hStream); described here. It takes a CUDA_MEMCPY3D structure by pointer ; and this pointer is not to some CUDA-driver-created entity - it's to a structure…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

Does cuMemcpy "care" about the current context?

Suppose I have a GPU and driver version supporting unified addressing; two GPUs, G0 and G1; a buffer allocated in G1 device memory; and that the current context C0 is a context for G0. Under these circumstances, is it legitimate to cuMemcpy() from…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
0
votes
1 answer

Fine grained Kernel scheduling with MPS

I am working on using NVIDIA CUDA Multi Process Service (MPS) for running multiple TensorFlow inference jobs using the same GPU. For my use-case, when GPU is being shared by more than one processes, I sometimes need to prioritize execution of…
0
votes
2 answers

How to reduce CUDA context size (Multi-Process Service)

I followed Robert Crovella's example on how to use Nvidia's Multi-Process Service. According to docs: 2.1.2. Reduced on-GPU context storage Without MPS each CUDA processes using a GPU allocates separate storage and scheduling resources on the…
alex
  • 10,900
  • 15
  • 70
  • 100
0
votes
1 answer

cuCtxGetApiVersion value differs from other version management calls

I'm running the following code: cuCtxCreate(&context, CU_CTX_SCHED_YIELD, device); int driverVersion = -1; int driverVersionRt = -1; int rtVersion = -1; unsigned int ctxVersion =…
Dillydill123
  • 693
  • 7
  • 22
0
votes
0 answers

Do failed CUDA memory allocations require a cudaDeviceReset call?

When a CUDA runtime API call for GPU memory allocation fails, is it necessary to reset the context using a call to cudaDeviceReset()?
Tyson Hilmer
  • 741
  • 7
  • 25
0
votes
0 answers

CUDA context was created on a GPU that is not currently debuggable

When I start Cuda debugging, Nsight returns this error: A CUDA context was created on a GPU that is not currently debuggable. Breakpoints will be disabled. Adapter: GeForce GT 720M I have Visual Studio 2017 and NVIDIA Nsight 5.4. Any…
Kacper
  • 620
  • 1
  • 7
  • 16
0
votes
1 answer

cuTexObjectCreate return error code

I am working with Cuda driver api, now i have a problem about Cuda texture object creation, it always return CUDA_ERROR_INVALUD_VALUE. I found function cuTexObjectCreate is wrapped by macro : #if __CUDA_API_VERSION >= 5000 ...function…
hamwj1991
  • 51
  • 8
0
votes
1 answer

Excessive Kernel Launches on Context Creation

Recently I began extending a very boost dependent project to use CUDA for its innermost loop. I thought it would be worth posting here about some odd behaviour I've been seeing though. Simply including certain boost headers will cause my first cuda…
longbowrocks
  • 491
  • 1
  • 5
  • 10
0
votes
1 answer

CUDA 5.0 context management with single application thread in multiple GPU environment

It seems that most tutorials, guides, books and Q&A from the web refers to CUDA 3 and 4.x, so that is why I'm asking it specifically about CUDA 5.0. To the question... I would like to program for an environment with two CUDA devices, but use only…
0
votes
1 answer

cuCtxCreate Fails with CUDA_ERROR_INVALID_DEVICE

I am getting CUDA_ERROR_INVALID_DEVICE error when creating a cuda context via cuCtxCreate. My code is creating a context and getting device from it and creating a new context. Any idea why I can't create another…
user1205476
  • 391
  • 1
  • 3
  • 12