본문 바로가기

분류 전체보기

(26)
Asynchronous IO Read (Direct I/O) #define _GNU_SOURCE #include #include #include #include #include #include #include #include void main() { char *path="file.txt"; // file path int flag = O_RDWR | O_DIRECT; // direct i/o flag mode_t mode = 0644; int fd = open(path, flag, mode); // open file with direct i/o if(fd == -1) fprintf(stderr, "Can't Open!!\n"); int ret, err; float *buf; int buf_size = 2048*sizeof(float); struct aiocb c_a..
Secrets of cudaMemcpyAsync delay Host To Device copy를 비동기식으로 사용하기 위해 cudaMemcpyAsync를 사용하고 있다. Nsight system으로 분석하던 중 cudaMemcpyAsync가 delay 되는 것을 확인했다. cudaMemcpyAsync가 delay되는 가정과 조건을 작성해본다. Asynchronous memory copy란, CPU의 cudaMemcpyAsync, kernel call (CUDA API) 등 과 GPU의 Memcpy HtoD, Kernel executions (CUDA HW) 등이 동기화 없이 동작하는 것이다. 만약 동기화 상태로 동작한다면 CPU가 kernel을 호출하고나서 GPU의 kernel 연산이 끝날때 까지 CPU는 계속 대기한다. 비동기식으로 동작하면 CPU는 호출만 하..
Nsight System : Getting Started Guide Nsight System Getting Started Guide Host PC : Ubuntu 18.04 (Desktop) Target PC : Ubuntu 18.04 (NVIDIA Jetson AGX Xavier) First, Install 'NVIDIA Nsight System' in Host Additionally, connect Host PC and Target PC with USB-C and USB 3.0 cable Check your target ip address $ ifconfig ex) l4tbr0 : 192.168.55.1 Launch nsight Create Network connection and Connect If the host PC is connected to the targe..
Nsights System : Naming tips (int+char) Ex) Edit as you like and Use it #include "nvToolsExt.h" char names[10][20] = {"a","b","c","d","e"}; for(int i = 0; i
SwapAdvisor: Pushing Deep Learning Beyond the GPU Memory Limit via Smart Swapping SwapAdvisor: Pushing Deep Learning Beyond the GPU Memory Limit via Smart Swapping ACM Reference Format: Chien-Chin Huang, Gu Jin, and Jinyang Li. 2020. SwapAdvisor: Pushing Deep Learning Beyond the GPU Memory Limit via Smart Swapping. In Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS ’20), March 16–20, 202..
Compute Solution for Tesla’s Full Self-Driving Computer Compute Solution for Tesla’s Full Self-Driving Computer Emil Talpes, Debjit Das Sarma, Ganesh Venkataramanan, Peter Bannon, Bill McGee, Benjamin Floering, Ankit Jalote, Christopher Hsiong, Sahil Arora, Atchyuth Gorti, and Gagandeep S. Sachdev Autopilot Hardware, Tesla Motors Inc. Digital Object Identifier 10.1109/MM.2020.2975764 Date of publication 24 February 2020; date of current version 18 Ma..
Memory address 0x55 & 0x7f 메모리에 관련되어 아는것이 없는 상태로 연구를 진행하게 되어 최근 1달간 메모리에 대해 많은 내용을 읽었고, 그중 대부분은 동적메모리 할당(dynamic memory allocation, malloc function)에 관련된 내용이다. 아주 기초적인 부분들은 구글에 간단히 검색해도 많은 내용이 나오기 때문에 생략하고, 의문점들과 발견부분만 기록한다. 기록해야겠다 싶은 순간의 내용만을 작성할 것이기 때문에 내용이 다소 불친절할 수 있다. 이번 내용은 동적메모리를 사용할때 주로 0x55와 0x7f로 시작하는 주소가 나타나는데 이에 대한 탐구이다. 언제는 0x55로 시작하고 언제는 0x7f로 시작해서 이 상황을 한번 기록해두려 한다. 다음 구조체를 만들고 malloc을 랩핑한 xmalloc을 사용하여 동적할..
Efficient Memory Management for Deep Neural Net Inference Efficient Memory Management for Deep Neural Net Inference Keywords : Deep neural networks, DNN inference, Intermediate tensors, Memory management, Tensor usage interval, Tensor usage record, Operator profile, Shared objects Related post : https://blog.tensorflow.org/2020/10/optimizing-tensorflow-lite-runtime.html ABSTRACT 심층 신경망 추론은 서버 전용 작업으로 간주되었지만 최신 기술 발전을 통해 추론 작업을 대기 시간에서 개인 정보 보호까지 다양한 이유..