vcuda-controller icon indicating copy to clipboard operation
vcuda-controller copied to clipboard

Doubts about cuArray3DCreate_helper calculating memory usage

Open rv64m opened this issue 4 years ago • 2 comments

I see the function

https://github.com/tkestack/vcuda-controller/blob/5ec3fcbc58679bbbbd82ef9e21d647d8d7383876/src/hijack_call.c#L713-L731

so, should it be change to

    request_size = base_size * pAllocateArray->NumChannels *
                   pAllocateArray->Height * pAllocateArray->Width * pAllocateArray->Depth;

rv64m avatar Nov 09 '21 03:11 rv64m

I see the function

https://github.com/tkestack/vcuda-controller/blob/5ec3fcbc58679bbbbd82ef9e21d647d8d7383876/src/hijack_call.c#L713-L731

so, should it be change to

    request_size = base_size * pAllocateArray->NumChannels *
                   pAllocateArray->Height * pAllocateArray->Width * pAllocateArray->Depth;

I'm not familiar with this api, maybe the calculation of memory is wrong, could you help to validate this?

mYmNeo avatar Nov 09 '21 06:11 mYmNeo

I see the function https://github.com/tkestack/vcuda-controller/blob/5ec3fcbc58679bbbbd82ef9e21d647d8d7383876/src/hijack_call.c#L713-L731

so, should it be change to

    request_size = base_size * pAllocateArray->NumChannels *
                   pAllocateArray->Height * pAllocateArray->Width * pAllocateArray->Depth;

I'm not familiar with this api, maybe the calculation of memory is wrong, could you help to validate this?

I see the function https://github.com/tkestack/vcuda-controller/blob/5ec3fcbc58679bbbbd82ef9e21d647d8d7383876/src/hijack_call.c#L713-L731

so, should it be change to

    request_size = base_size * pAllocateArray->NumChannels *
                   pAllocateArray->Height * pAllocateArray->Width * pAllocateArray->Depth;

I'm not familiar with this api, maybe the calculation of memory is wrong, could you help to validate this?

Of course, I will verify and try to fix it later.

rv64m avatar Nov 09 '21 06:11 rv64m

#28

mYmNeo avatar Nov 15 '22 01:11 mYmNeo