gpu

How to convert an ffmpeg texture to Open GL texture without copying to CPU memory

早过忘川 提交于 2020-06-22 03:27:25
问题 This ffmpeg example demonstrates how to do hardware decoding: https://github.com/FFmpeg/FFmpeg/blob/release/4.2/doc/examples/hw_decode.c At line 109 it does this: /* retrieve data from GPU to CPU */ if ((ret = av_hwframe_transfer_data(sw_frame, frame, 0)) < 0) { I want to avoid this because it takes time. Therefore, I need a way to reuse that decoded video, which is in GPU memory, to redo color conversion. How to transform the decoded texture in GPU memory to texture in Open GL without

Does Numpy automatically detect and use GPU?

坚强是说给别人听的谎言 提交于 2020-06-09 16:47:41
问题 I have a few basic questions about using Numpy with GPU (nvidia GTX 1080 Ti). I'm new to GPU, and would like to make sure I'm properly using the GPU to accelerate Numpy/Python. I searched on the internet for a while, but didn't find a simple tutorial that addressed my questions. I'd appreciate it if someone can give me some pointers: 1) Does Numpy/Python automatically detect the presence of GPU and utilize it to speed up matrix computation (e.g. numpy.multiply, numpy.linalg.inv, ... etc)? Or

How to define max_queue_size, workers and use_multiprocessing in keras fit_generator()?

浪尽此生 提交于 2020-06-09 08:37:34
问题 I am applying transfer-learning on a pre-trained network using the GPU version of keras. I don't understand how to define the parameters max_queue_size , workers , and use_multiprocessing . If I change these parameters (primarily to speed-up learning), I am unsure whether all data is still seen per epoch. max_queue_size : maximum size of the internal training queue which is used to "precache" samples from the generator Question: Does this refer to how many batches are prepared on CPU? How is

Keras uses GPU for first 2 epochs, then stops using it

久未见 提交于 2020-06-09 05:25:05
问题 I prepare the dataset and save it as as hdf5 file. I have a custom data generator that subclasses Sequence from keras and generates batches from the hdf5 file. Now, when I model.fit_generator using the train generator, the model uses the GPU and trains fast for the first 2 epochs (GPU memory is full and GPU volatile usage fluctuates nicely around 50%). However, after the 3rd epoch, GPU volatile usage is 0% and the epoch takes 20x as long. What's going on here? 回答1: Can you try configuring GPU

How to fix 'Input and hidden tensors are not at the same device' in pytorch

一世执手 提交于 2020-05-30 08:04:43
问题 When I want to put the model on the GPU, there is an error! It said the Inputs is on GPU, but the hidden state is on CPU. However, all of them had been put on the GPU. I use for m in model.parameters(): print(m.device) #return cuda:0 to see all of the state on the model is on the GPU device. The error is "RuntimeError: Input and hidden tensors are not at the same device, found input tensor at cuda:0 and hidden tensor at cpu" Windows 10 server Pytorch 1.2.0 + cuda 9.2 cuda 9.2 cudnn 7.6.3 for

How to fix 'Input and hidden tensors are not at the same device' in pytorch

允我心安 提交于 2020-05-30 08:03:30
问题 When I want to put the model on the GPU, there is an error! It said the Inputs is on GPU, but the hidden state is on CPU. However, all of them had been put on the GPU. I use for m in model.parameters(): print(m.device) #return cuda:0 to see all of the state on the model is on the GPU device. The error is "RuntimeError: Input and hidden tensors are not at the same device, found input tensor at cuda:0 and hidden tensor at cpu" Windows 10 server Pytorch 1.2.0 + cuda 9.2 cuda 9.2 cudnn 7.6.3 for

Can multiple processes share one CUDA context?

无人久伴 提交于 2020-05-15 09:26:21
问题 This question is a followup on Jason R's comment to Robert Crovellas answer on this original question ("Multiple CUDA contexts for one device - any sense?"): When you say that multiple contexts cannot run concurrently, is this limited to kernel launches only, or does it refer to memory transfers as well? I have been considering a multiprocess design all on the same GPU that uses the IPC API to transfer buffers from process to process. Does this mean that effectively, only one process at a

Tensorflow: How do you monitor GPU performance during model training in real-time?

馋奶兔 提交于 2020-05-12 12:22:25
问题 I am new to Ubuntu and GPUs and have recently been using a new PC with Ubuntu 16.04 and 4 NVIDIA 1080ti GPUs in our lab. The machine also has an i7 16 core processor. I have some basic questions: Tensorflow is installed for GPU. I presume then, that it automatically prioritises GPU usage? If so, does it use all 4 together or does it use 1 and then recruit another if needed? Can I monitor in real-time, the GPU use/activity during training of a model? I fully understand this is basic hardware

Tensorflow: How do you monitor GPU performance during model training in real-time?

强颜欢笑 提交于 2020-05-12 12:22:11
问题 I am new to Ubuntu and GPUs and have recently been using a new PC with Ubuntu 16.04 and 4 NVIDIA 1080ti GPUs in our lab. The machine also has an i7 16 core processor. I have some basic questions: Tensorflow is installed for GPU. I presume then, that it automatically prioritises GPU usage? If so, does it use all 4 together or does it use 1 and then recruit another if needed? Can I monitor in real-time, the GPU use/activity during training of a model? I fully understand this is basic hardware

nvidia-smi does not display memory usage [closed]

蓝咒 提交于 2020-05-11 05:41:28
问题 Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I want to use nvidia-smi to monitor my GPU for my machine-learning/ AI projects. However, when I run nvidia-smi in my cmd, git bash or powershell, I get the following results: $ nvidia-smi Sun May 28 13:25:46 2017 +-----------------------------------------------------------------------