Profiling Halide DSL with performance events for schedule optimization

Detalhes bibliográficos
Ano de defesa: 2019
Autor(a) principal: Machado, Rafael Ravedutti L., 1995-
Orientador(a): Weingaertner, Daniel, 1976-
Banca de defesa: Não Informado pela instituição
Tipo de documento: Dissertação
Tipo de acesso: Acesso aberto
Idioma: eng
Instituição de defesa: Não Informado pela instituição
Programa de Pós-Graduação: Não Informado pela instituição
Departamento: Não Informado pela instituição
País: Não Informado pela instituição
Palavras-chave em Português:
Link de acesso: https://hdl.handle.net/1884/64250
Resumo: Orientador: Daniel Weingaertner
id UFPR_5edf797752129c545756f2b76d421aa3
oai_identifier_str oai:acervodigital.ufpr.br:1884/64250
network_acronym_str UFPR
network_name_str Repositório Institucional da UFPR
repository_id_str
spelling Machado, Rafael Ravedutti L., 1995-Maidl, André MurbachUniversidade Federal do Paraná. Setor de Ciências Exatas. Programa de Pós-Graduação em InformáticaWeingaertner, Daniel, 1976-2021-06-21T20:22:54Z2021-06-21T20:22:54Z2019https://hdl.handle.net/1884/64250Orientador: Daniel WeingaertnerCoorientador: Andre Murbach MaidlDissertação (mestrado) - Universidade Federal do Paraná, Setor de Ciências Exatas, Programa de Pós-Graduação em Informática. Defesa : Curitiba, 01/08/2019Inclui referências: p. 68-73Área de concentração: Ciência da ComputaçãoResumo: Aplicações de processamento de imagens atualmente requerem otimizações e especializações apropriadas para que possam atingir boa performance em hardwares paralelos e heterogêneos disponíveis. Um problema existente utilizando linguagens de propósito geral é que cada desenvolvedor precisa escrever diferentes versões da mesma aplicação para executar de maneira otimizada em diferentes tipos de hardware, o que requer mais trabalho e conhecimento destes desenvolvedores e também prejudica a manutenabilidade do software. Halide é uma linguagem de domínio específico (DSL) para processamento de imagens que reforça a separação do algoritmo e do escalonamento de execução, permitindo a geração de código especializado para conjuntos de instruções de arquiteturas distintos reescrevendo apenas o escalonamento de execução, ao invés de todo o algoritmo. Halide torna muito mais prático escrever programas de processamento de imagens otimizados porque apenas o escalonamento precisa ser ajustado, no entanto escrever bons escalonamentos Halide não é uma tarefa fácil. Para alcançar bom escalonamento de pipelines Halide, ainda é necessário um profundo entendimento das arquiteturas alvo. Além disso, quando o tamanho e a complexidade do pipeline crescem, encontrar bons escalonamentos se torna muito mais desafiador para os desenvolvedores do escalonamento. Para ajudar na criação de bons escalonamentos Halide, nosso trabalho estende a DSL Halide adicionando uma API de instrumentação que utiliza eventos de desempenho da CPU para medir eventos suportados pelo processador alvo durante a execução da aplicação. A extensão proposta oferece instrumentação de diferentes níveis de laço e relações de produção e consumo de funções, embutindo chamadas para uma biblioteca de instrumentação nos laços aninhados do código gerado. A extensão também suporta a instrumentação individual por threads em regiões paralelas. Como um caso de estudo utilizamos a biblioteca PAPI para contar eventos tais como misses na cache L1, número de operações em ponto flutuante (FLOP) e volume de dados da cache L3 em uma CPU Intel Core i5-7500, e discutimos como os resultados reportados podem ser utilizados para manualmente ou automaticamente gerar melhores escalonamentos para um pipeline de processamento de imagens. Palavras-chave: processamento de imagens, profiler, linguagem de domínio específicoAbstract: Image processing applications require proper optimization and specialization in order to achieve good performance in current parallel and heterogeneous hardware available. An existing issue with this approach on general purpose languages is that each developer needs to write different versions of the same application to execute optimally in different types of hardware, which requires more work and knowledge from application developers and also difficults software maintainability. Halide is a domain-specific language (DSL) for image processing that enforces a separation of the algorithm and the execution schedule, allowing the generation of specialized code for distinct compute architectures by rewriting only the execution scheduler, instead of the whole algorithm. Halide turns much more practical to write optimized image processing programs because only the schedule has to be adjusted, thought writing good schedules for Halide is not an easy task. To achieve good scheduling of Halide pipelines, it is still necessary to have a deep understanding of the target architectures. Besides, when the size and complexity of the pipeline grows, finding good schedules becomes much more challenging for the schedule developers. In order to support the creation of good Halide schedulers, our work extends the Halide DSL by adding a profiling API that uses the CPU Performance Events to measure events supported by the target processor during the application runtime. The proposed extension offers profiling of the application loop levels and functions' producer and consumer relations, embedding calls to a profiling library in the loop nests of the generated code. It also supports individualized profiling by threads on parallel regions. As a case study we use the PAPI library in order to count events such as L1 cache misses, number of float operations (FLOP) and L3 data volume on an Intel Core i5-7500 CPU, and discuss how the reported results can be used to manually or automatically generate better schedules for an image processing pipeline. Keywords: image processing, profiler, domain specific language78 p. : il. (algumas color.).application/pdfProcessamento de imagensCiência da ComputaçãoProfiling Halide DSL with performance events for schedule optimizationinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisengreponame:Repositório Institucional da UFPRinstname:Universidade Federal do Paraná (UFPR)instacron:UFPRinfo:eu-repo/semantics/openAccessORIGINALR - D - RAFAEL RAVEDUTTI LUCIO MACHADO.pdfapplication/pdf2911006https://acervodigital.ufpr.br/bitstream/1884/64250/1/R%20-%20D%20-%20RAFAEL%20RAVEDUTTI%20LUCIO%20MACHADO.pdf65c8bfd51c534d7f645485ca76d3f7a3MD51open access1884/642502021-06-21 17:22:54.51open accessoai:acervodigital.ufpr.br:1884/64250Repositório InstitucionalPUBhttp://acervodigital.ufpr.br/oai/requestinformacaodigital@ufpr.bropendoar:3082021-06-21T20:22:54Repositório Institucional da UFPR - Universidade Federal do Paraná (UFPR)false
dc.title.pt_BR.fl_str_mv Profiling Halide DSL with performance events for schedule optimization
title Profiling Halide DSL with performance events for schedule optimization
spellingShingle Profiling Halide DSL with performance events for schedule optimization
Machado, Rafael Ravedutti L., 1995-
Processamento de imagens
Ciência da Computação
title_short Profiling Halide DSL with performance events for schedule optimization
title_full Profiling Halide DSL with performance events for schedule optimization
title_fullStr Profiling Halide DSL with performance events for schedule optimization
title_full_unstemmed Profiling Halide DSL with performance events for schedule optimization
title_sort Profiling Halide DSL with performance events for schedule optimization
author Machado, Rafael Ravedutti L., 1995-
author_facet Machado, Rafael Ravedutti L., 1995-
author_role author
dc.contributor.other.pt_BR.fl_str_mv Maidl, André Murbach
Universidade Federal do Paraná. Setor de Ciências Exatas. Programa de Pós-Graduação em Informática
dc.contributor.author.fl_str_mv Machado, Rafael Ravedutti L., 1995-
dc.contributor.advisor1.fl_str_mv Weingaertner, Daniel, 1976-
contributor_str_mv Weingaertner, Daniel, 1976-
dc.subject.por.fl_str_mv Processamento de imagens
Ciência da Computação
topic Processamento de imagens
Ciência da Computação
description Orientador: Daniel Weingaertner
publishDate 2019
dc.date.issued.fl_str_mv 2019
dc.date.accessioned.fl_str_mv 2021-06-21T20:22:54Z
dc.date.available.fl_str_mv 2021-06-21T20:22:54Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv https://hdl.handle.net/1884/64250
url https://hdl.handle.net/1884/64250
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv 78 p. : il. (algumas color.).
application/pdf
dc.source.none.fl_str_mv reponame:Repositório Institucional da UFPR
instname:Universidade Federal do Paraná (UFPR)
instacron:UFPR
instname_str Universidade Federal do Paraná (UFPR)
instacron_str UFPR
institution UFPR
reponame_str Repositório Institucional da UFPR
collection Repositório Institucional da UFPR
bitstream.url.fl_str_mv https://acervodigital.ufpr.br/bitstream/1884/64250/1/R%20-%20D%20-%20RAFAEL%20RAVEDUTTI%20LUCIO%20MACHADO.pdf
bitstream.checksum.fl_str_mv 65c8bfd51c534d7f645485ca76d3f7a3
bitstream.checksumAlgorithm.fl_str_mv MD5
repository.name.fl_str_mv Repositório Institucional da UFPR - Universidade Federal do Paraná (UFPR)
repository.mail.fl_str_mv informacaodigital@ufpr.br
_version_ 1847526095878881280