분류 전체보기(48)
-
PyTorch Autograd Profiler
링크: https://pytorch.org/docs/stable/autograd.html#torch.autograd.profiler.profile Automatic differentiation package - torch.autograd — PyTorch master documentation Automatic differentiation package - torch.autograd torch.autograd provides classes and functions implementing automatic differentiation of arbitrary scalar valued functions. It requires minimal changes to the existing code - you only ..
2020.02.02 -
[SOSP 19] TASO: Optimizing Deep Learning Computation with Automatic Generation of Graph Substitutions
현존하는 DNN 프레임워크는 개발자가 매뉴얼하게 짜놓은 규칙에 따라서 graph optimzation을 수행하는데 이는 scalable 하지 못하며 모든 optimizable option들을 반영하지 못하는 단점이 있다. TASO는 자동으로 효율적인 graph substitution을 생성하는 최초의 DNN graph optimizer이다. TASO Github: https://github.com/jiazhihao/TASO substitutions computation graph의 런타임 퍼포먼스를 향상시키기 위해서 할 수 있는 가장 일반적인 방법은 graph substitution이다. graph substitution은 기존 그래프의 일부(subgraph)를 그것과 equivalent 하면서 보다 효..
2020.02.01 -
[Pytorch Error] RuntimeError: Given input size: (256x1x1). Calculated output size: (256x0x0). Output size is too small
Issue RuntimeError: Given input size: (256x1x1). Calculated output size: (256x0x0). Output size is too small input tensor의 크기가 작아서 생기는 문제이다. input tensor의 shape을 조정해주면 해결 가능하다. Solution transform = transforms.Compose([ transforms.Resize(256), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize( mean=model.original_model_info.mean, std=model.original_model_info.std ), ]..
2020.01.21 -
[Paper Review] Trace-based Just-in-Time Type Specialization for Dynamic Languages
이 논문은 JavaScript를 타켓으로 하고 있지만 요즘 연구하고 있는 pytorch의 JIT(just-in-time) 컴파일러 연구에 중요한 바탕이 되는 연구이기에 리뷰를 작성한다. Abstract 자바스크립트와 같은 dynamic language(js, python, ruby, ...)는 static language(c, c++, ...)와 비교했을 때 컴파일에 많은 어려움이 존재한다. 그 주된 이유는 변수의 type이나 branch와 같은 정보들을 compile time에는 알 수 없고, runtime이 되어서야 알 수 있기 때문이다. Python과 같은 dynamic language는 컴파일 시점에 구체적인 타입에 대한 정보가 없기 때문에, 기존의 컴파일러들은 가능한 모든 조합의 타입들을 런타임..
2020.01.16 -
[Operating System] Scheduling
[1] Scheduling (Single-Processor의 경우) CPU Virtualization CPU virtualization이란 실제로는 여러 프로세스가 CPU와 메모리 자원을 공유하지만 각각의 프로세스에게는 마치 독점적으로 CPU와 메모리를 사용하는 듯한 착각을 주는 것을 의미한다. CPU virtualization은 context switch를 통한 time sharing, 그리고 가상 메모리를 활용한 space-sharing을 통해 이루어진다. CPU virtualization을 위해서는 dispatcher(어떻게 context switch를 할지, 어떤 context를 save-restore할지)와 scheduler(어떤 프로세스를 실행 시킬지)가 필요하다. Scheduler 성능 평가..
2020.01.16 -
[Operating System] Process
1. Process Process란? 현재 running 중인 프로그램의 인스턴스로 프로그램 instruction들의 execution stream이다. 각 프로세스는 독립적인 주소공간, 레지스터, open file table을 가진다. CPU Virtualization 마치 CPU를 독점적으로 사용하는 듯한 착시를 주는 것. by time sharing: 코어가 1개밖에 없더라도 프로세스 간에 context switch가 빠르게 이루어지면서 마치 서로 다른 프로그램들이 동시에 실행되는 듯한 착각을 준다. by space-sharing: 각 프로세스들이 메모리와 디스크 전체를 독점적으로 사용하는 듯한 착각을 준다. 싱글 코어 CPU의 time-sharing 과정 (Direct execution인 경우) ..
2020.01.16