[CUDA] CUDA Driver Version
CUDA Driver Running a CUDA application requires the system with at least one CUDA capable GPU and a driver that is compatible with the CUDA Toolkit. See Table 2. For more information various GPU products that are CUDA capable, visit https://developer.nvidia.com/cuda-gpus. Each release of the CUDA Toolkit requires a minimum version of the CUDA driver. The CUDA driver is backward compatible, meani..
2020.07.06
[TensorRT] TensorRT GA vs RC => Use the GA version
TensorRT 다운로드 시 특별한 이유가 없는 경우, GA 버전을 다운 받는 것을 추천한다. GA is a production release, it stands for "General Availability". It is the version most people should be using, for most activities. It has gone through a full test cycle. RC is a "Release Candidate". It is a preproduction version, an early release version. In general, the recommendation would be to use a GA version, unless you have a specifi..
2020.05.18
[PyCUDA] 정리중
https://documen.tician.de/pycuda/driver.html Device Interface — PyCUDA 2019.1.2 documentation Pagelocked Allocation pycuda.driver.pagelocked_empty(shape, dtype, order='C', mem_flags=0) Allocate a pagelocked numpy.ndarray of shape, dtype and order. mem_flags may be one of the values in host_alloc_flags. It may only be non-zero on CUDA 2.2 and newer. documen.tician.de https://documen.tician.de/pyc..
2020.05.14
[Onnx] Onnx Tutorials (정리중)
Onnx Tutorials https://github.com/onnx/tutorials onnx/tutorials Tutorials for creating and using ONNX models. Contribute to onnx/tutorials development by creating an account on GitHub. github.com https://github.com/onnx/onnx-tensorrt onnx/onnx-tensorrt ONNX-TensorRT: TensorRT backend for ONNX. Contribute to onnx/onnx-tensorrt development by creating an account on GitHub. github.com https://githu..
2020.05.14
no image
[TensorRT] TensorRT 및 Tensor Core에서 NCHW vs NHWC 형식의 성능 차이
1. TensorRT : NCHW vs NHWC "It’s recommended to use NCHW format to get better performance with TensorRT." NVIDIA 에서는 TensorRT 입력 값으로 NCHW 포맷을 권장한다. 사용자가 TensorRT Engine 에 Input 값을 NHWC 포맷으로 입력해도 되지만, TensorRT 에서 최적화 될 때, 입력값과 호환되도록 여러 형식 변환기를 자동으로 삽입한다. 즉, NVIDIA는 입력값이 어찌되었던 GPU Acceleration 으로 인해 NCHW 를 형식을 채택한다. 또한, NHWC 형식을 선호하는 경우 UFF Parser 가 호환성을 처리할 수 있으며, 일반적으로 Caffe 는 NCHW 형식을 사용하며, 호환하..
2020.04.29
[TensorRT] 지원되는 연산자 목록 (2020.04.29 기준)
TensorRT 에서 지원되는 Operators 는 다음과 같다. (2020.04.29 기준) Caffe BatchNormalization BNLL Clip Concatenation Convolution Crop Deconvolution Dropout ElementWise ELU InnerProduct Input LeakyReLU LRN Permute Pooling Power Reduction ReLU, TanH, and Sigmoid Reshape SoftMax Scale Clip : When using the Clip operation, Caffe users must serialize their layers using ditcaffe.pb.h instead of caffe.pb.h in order t..
2020.04.29
no image
[ONNX] Pytorch 에서 Onnx 로 변환 시 Gather op 때문에 export 안되는 문제
Pytorch 에서 Onnx 모델로 변환시 Gather 와 같은 옵션 때문에 변환이 안되는 문제가 발생한다. 이유는 Onnx 에서 Gather 라는 옵션을 지원하지 않기 때문이다. (2020.04.28 기준) 아래와 같이 interpolate 를 scale factor 로 구현하였을 때 class ResizeModel(nn.Module): def __init__(self): super(ResizeModel, self).__init__() def forward(self, x): return F.interpolate(x, scale_factor=(2, 2), mode='nearest') 생성되는 그래프는 아래와 같다 위와 같이 구현할 경우 "Gather" 라는 op 이 붙어서 그래프가 생성되는데, Onnx ..
2020.04.28
no image
[TensorRT] NVIDIA TensorRT 개념, 설치방법, 사용하기
1. TensorRT 란? 2. TensorRT 설치하기 3. 여러 프레임워크에서 TensorRT 사용하기 1. TensorRT 란? TensorRT는 학습된 딥러닝 모델을 최적화하여 NVIDIA GPU 상에서의 추론 속도를 수배 ~ 수십배 까지 향상시켜 딥러닝 서비스를 개선하는데 도움을 줄 수 있는 모델 최적화 엔진이다. 흔히들 우리가 접하는 Caffe, Pytorch, TensorFlow, PaddlePaddle 등의 딥러닝 프레임워크를 통해 짜여진 딥러닝 모델을 TensorRT를 통해 모델을 최적화하여 TESLA T4 , JETSON TX2, TESLA V100 등의 NVIDIA GPU 플랫폼에 아름답게 싣는 것이다. 또한, TensorRT는 NVIDIA GPU 연산에 적합한 최적화 기법들을 이용하..
2020.04.21
[TensorRT] AttributeError: 'NoneType' object has no attribute 'serialize'
에러 : AttributeError: 'NoneType' object has no attribute 'serialize' 이 에러는 말 그대로 TensorRT Engine 이 Serialize 되지 않는 문제인데, 다음과 같은 이유 때문에 Serialize 되지 않는 것이다. - builder.create_network() 함수에서 나온 network 가 노드들을 완전하게 포함하고 있지 않아서 생기는 문제 - Input 부터 Output 까지 필요한 노드들을 포함하고 있지 않기 때문에 아래와 같은 에러가 발생 - [TensorRT] ERROR: Network must have at least one output - Output Node 를 찾을 수 없어서 Output 이 인식이 안되는 것 - 그래서 반환..
2020.03.12
no image
[GPU] GPU Performance 및 Titan V, RTX 2080 Ti Benchmark
TPU V100 TiTan V Titan RTX RTX 2080 Ti RTX 2080 Titan Xp Titan X GTX 1080 Ti RTX 2070 RTX 2060 GTX 1080 GTX 1070 Ti GTX 1070 GTX 1660 Ti GTX 1060 Titan V Benchmark FP32 TensorFlow Training Performance FP16 TensorFlow Training Performance RTX 2080 Ti Benchmark RTX 2080 Ti - FP32 TensorFlow Performance (1 GPU) For FP32 training of neural networks, the RTX 2080 Ti is... 37% faster than RTX 2080 35%..
2020.03.04
[Pytorch] 장치간 모델 불러오기 (GPU / CPU)
1. GPU에서 모델을 저장하고 CPU에서 불러오기 2. GPU에서 저장하고 GPU에서 불러오기 3. CPU에서 모델을 저장하고 GPU에서 불러오기 1. GPU에서 모델을 저장하고 CPU에서 불러오기 GPU 모델 저장 torch.save(model.state_dict(), PATH) 저장한 모델을 CPU에서 로드 device = torch.device('cpu') model = TheModelClass(*args, **kwargs) model.load_state_dict(torch.load(PATH, map_location=device)) 위와 같이 GPU에서 학습한 모델을 CPU에서 불러올 때는 torch.load() 함수의 map_location 인자에 'cpu' 값을 전달함 이 경우에는 Tensor..
2020.01.09
no image
[TensorFlow] Windows 환경에서 TensorFlow 1.14 버전 Bazel 빌드하기 with C++
환경구축 [설치되었다고 가정] Windows 10 CUDA 10.0 / cuDNN 7.5.0 Visual Studio 2015 Microsoft Visual C++ 2015 Redistributable (x86 and x64) 14.0.24215 Microsoft Build Tools 2015 Update 3 [포스팅에서 설치할 것] TensorFlow 1.14 MSYS2 Bazel 0.25.0 Python3.6 ( TensorFlow 빌드 종속성 때문에 설치하는 것) 1. Python 다운로드 TensorFlow 를 소스 빌드 하기 위해서는 Python Dependency 가 필요하기 때문에 Python 을 설치한다. Python 버전은 3.5.x 또는 3.6.x 버전 64비트 이면 상관 없다. htt..
2019.12.18