Popis: |
Diplomsko delo obravnava implementacijo in uporabo testnega orodja za testiranje implementacij standarda OpenCL. Standard definira vmesnik API, izvajalno okolje in programski jezik OpenCL C, ki skupaj poenotijo programiranje vseh procesorjev, podprtih s strani implementacije. Implementacija tako obsežnega standarda je zahtevna in nagnjena k napakam, zato je zanjo potrebno primerno testno orodje. Testno orodje, napisano v sklopu diplomskega dela in sponzorstva skupnosti X.Org, predstavlja odprtokodno rešitev opisanega problema. Razvito orodje omogoča hitro pisanje testov in je enostavno razširljivo. Uvede izvajalca in tipe testov, ki glede na konfiguracijske nastavitve posameznega testa postavijo primerno izvajalno okolje OpenCL in v njem poženejo test. Testi, napisani za orodje, so minimalni in razdeljeni na konfiguracijsko strukturo za postavljanje izvajalnega okolja in testno funkcijo, ali testni program OpenCL C, za testiranje potrebne funkcionalnosti, navedene v standardu. Z dodajanjem novih tipov testov je mogoče orodje poljubno razširiti. Najbolj napreden del orodja omogoča implicitno pisanje testov za programski jezik OpenCL C, kjer se konfiguracijska struktura in test nahajata v izvorni datoteki OpenCL C. Združitev testnega orodja s testnim orodjem Piglit doda avtomatsko izvajanje skupin testov in grafični prikaz rezultatov. The thesis discusses implementation and use of a testing tool for testing implementations of the OpenCL standard. The standard defines an API interface, runtime environment and OpenCL C programming language, which together standardize programming of all processors supported by the implementation. Implementation of such a comprehensive standard is difficult and prone to errors, and therefore requires a suitable test tool. The testing tool written in the context of the thesis and sponsorship of the X.Org community represents an open-source solution of the problem. The developed tool enables quick writing of tests and is easily extendable. It introduces a test runner and types of tests which, depending on the configuration of a test, set a suitable OpenCL runtime environment and execute a test in it. Tests written for the tool are minimal and divided into a configuration structure for setting a runtime environment and a test function, or OpenCL C test program, for testing required functionality specified in the standard. With the addition of new types of tests the tool can be arbitrarily extended. The most advanced part of the tool allows implicit writing of tests for programming language OpenCL C where the configuration structure and the test are located in the OpenCL C source file. Merging of the testing tool with the Piglit testing tool adds automatic execution of groups of tests and graphical presentation of results. |