Evaluating Mixed-Precision Tuning on a Per-Function Basis
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesis
Abstract [en]
Mixed-precision tuning is the process of tuning the precision of variables in programs to enhance performance. This is done while adhering to some kind of error threshold, to maintain accuracy. Most tools currently, typically work on the granularity of variables, meaning that for each program, every variable is considered for a change in precision. These tools do this automatically by utilizing search techniques to optimize the search, since a brute-force approach is not viable. Even then, these tools take a long time to tune programs due to the amount of configurations. This thesis introduces mixed-precision tuning at a per-function granularity, to analyze how effective it is compared to per-variable granularity tuning. This is important since a program typically has significantly fewer functions than variables, thus naturally reduce the search space. To implement this, an LLVM pass was developed that downcasts specified functions, including all variables and operations inside of the function, except for arrays. Automating this process involved writing a Python script that supplied configurations to the LLVM pass. We found that the amount of time it takes to finish a full tuning pipeline is around 65-78 times faster, when running each configuration 5 times. However, the performance gain varied significantly, ranging from a maximum of 22.7% improvement to a 35.08% slowdown. These findings suggest that mixed-precision tuning at a per-function granularity shows promise, but future work is needed — particularly in handling arrays — since these introduce a lot of casting overhead that can negate performance gains.
Place, publisher, year, edition, pages
2025. , p. 50
Series
IT ; mDV 25 017
National Category
Natural Sciences Computer Sciences
Identifiers
URN: urn:nbn:se:uu:diva-563019OAI: oai:DiVA.org:uu-563019DiVA, id: diva2:1980810
Educational program
Master Programme in Computer Science
Supervisors
Examiners
2025-07-032025-07-022025-07-03Bibliographically approved