This chapter demonstrated the concepts of programming in PyCUDA. It started with the development of a simple Hello, PyCUDA program using PyCUDA. The concepts of kernel definition in C or C++ and calling it from Python code and the API for accessing GPU device properties from a PyCUDA program were discussed in detail. The execution mechanism for multiple threads and blocks in a PyCUDA program was explained with a simple program. The basic structure of a PyCUDA program was described with a simple example of an array addition. The simplification of PyCUDA code was described by using directives from a driver class. The use of CUDA events to measure the performance of the PyCUDA programs was explained in detail. The functionality of the inout directive of the driver class and the gpuarray class was explained using an element-wise squaring example. The gpuarray class was used...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia