• Tidak ada hasil yang ditemukan

Vivaldi: a Python-like domain-specific language for volume rendering and processing

N/A
N/A
Protected

Academic year: 2023

Membagikan "Vivaldi: a Python-like domain-specific language for volume rendering and processing "

Copied!
44
0
0

Teks penuh

Vivaldi is based on Python, but it can also provide parallel volume rendering and processing in distributed heterogeneous systems. One of the goals of Vivaldi is to minimize these required programming skills by using a domain-specific language for large-scale rendering and visualization that is Python-like and platform-independent. A parallel visualization model, a virtual shared memory model, and a platform-independent architecture for distributed heterogeneous systems are proposed in this language.

Finally, the platform-agnostic design unifies central processing units (CPUs) and GPUs into a common domain-specific language.

Background

Thesis Statement

A domain-specific language achieves a better balance between programming libraries and handheld systems for domain scientists and researchers using GPU arrays. Therefore, domain scientists and researchers require a new domain-specific language for visualization using GPU clusters.

Challenges

Currently, there are several domain-specific languages ​​for visualization, but none of them support GPU clusters. It is easy to use due to its Python-like syntax, reduces programming effort by using many domain-specific functions, and provides parallel visualization using a new syntax.

Contributions

The volume jet casting algorithm requires a significant amount of computation; therefore, GPUs are widely used to accelerate it. It consists of a fast jetting algorithm with pre-integration and mesoscopic scale direct volume rendering so that the step size is much larger than ordinary jet casting. Other groups have tried to balance image error and performance to achieve real-time volume rendering.

Progressive interactive visualization with spatio-temporal error control[8] is a proposed method for balancing volume rendering with fixed frame rate and volume rendering with fixed image quality. Vivaldi is inspired by Shadie, specifically, its set of domain-specific functions and its Python-like front end. Because volume processing requires a significant amount of computation, a result cannot be generated using only a real-time GPU.

Therefore, Vivaldi has an increased number of GPUs that it can control for real-time volume rendering. However, Vivaldi has some new syntax and limitations to support distributed heterogeneous systems that use a domain-specific language. In line 14, the stored image function requests the result as "mip.png". The split buffers are then merged, sent to the dedicated I/O process, and written to the hard disk.

Figure 1: Vivaldi version of parallel maximum intensity projection volume rendering using four GPUs on a GPU cluster.
Figure 1: Vivaldi version of parallel maximum intensity projection volume rendering using four GPUs on a GPU cluster.

Worker Functions

Execution modifiers are translated before execution because they are not a syntax in native Python (note that there are other reasons related to the implementation of the virtual memory model that are explained later). The task generator creates multiple tasks using job functions and execution modifiers and registers the tasks in the scheduler. For example, a function without a sink is not executed, even if there are functions in the main function.

However, there must be some limitations to ensure platform independent execution, because some syntax and functions do not exist in different devices. Second, a user cannot use Python modules in the worker function because not every programming language has Python modules. However, if the translator developer prepares a conversion from NumPy to CUDA functions, the user can use NumPy in the worker function.

Parallel Processing Model

This model can process out-of-core data because it splits input data into small pieces and the runtime system releases already used data in real time. In-and-out split model with different split shape: This model is another case of the in-and-out split model. The combination of input data splits is the same as the number of output splits, but the shape of the split is different.

Figure 2: Parallel processing models are specified by how the data is split. They are well suited for visualization pipelines.
Figure 2: Parallel processing models are specified by how the data is split. They are well suited for visualization pipelines.

Domain-Specific Functions

The user can split the data using the split modifier and then specify the halo using the halo modifier. After running the function, a zero size halo is created because that is the default halo size. Before starting the next iteration, the runtime system automatically communicates the halo and starts the next step.

If the input halo size is one and the output halo size is zero, then halo communication occurs at each iteration.

Figure 4: Example of a 3D mean filter using a cube iterator.
Figure 4: Example of a 3D mean filter using a cube iterator.

Virtual Shared Memory Model

Execution Unit

The heterogeneous devices are managed by an execution unit that is responsible for actual devices such as CPUs and GPUs. It manages everything related to the device, such as data transfer, memory allocation, memory allocation, device-dependent optimization and function execution. This process always waits for the next task and then executes it on a real device.

All executables can execute a work function without an executable object because they have a built-in compiler and compiler to execute the work function. When the task arrives, the executive unit translates and translates it in a timely manner. This way, there are other execution units for other devices, and Vivaldi can provide tasks to those devices.

Data transfer between different types of execution units is always possible because the units have access to CPU memory regardless of their implementation. For example, a GPU execution unit can transfer data from the GPU to CPU memory for transfer to the CPU execution unit. Additionally, Vivaldi has accelerated data transfer between GPUs, called GPU direct memory access, implemented using OpenMPI and PyCUDA.

Data Reader

Scheduler

Parallelism

  • Data package
  • Retain Count
  • Data Creation
  • Data Access

The scheduler creates it for each subdata, and the system partially allocates and releases part of the data. The scheduler uses it instead of the actual contents of the buffer for data management. There are four types of information in the data packet: the ID that indicates the actual data, the buffer divisions, information about the parent data, and information about the file on the hard disk.

The retained counts are managed in the scheduler as a retained count dictionary because every event in the system is reported to the scheduler, so the scheduler can change the retained count value instantaneously. For example, when a task is completed, the execution unit reports that it no longer needs the data, and the scheduler decrements the retention count of the data. For example, half the size of the data can be created by using two quarters of the data.

This is implemented using a dictionary called the 'remaining write count', where the key is the data ID and the value is the number of writes required to complete the data buffer. Otherwise, it returns to the beginning of the iteration if the dataset is not available. Once the data set is defined, in lines 14 through 15 we increment the retention count of the source data and increment the remaining write count of the target buffer.

Figure 9: Data package class that includes information about real data.
Figure 9: Data package class that includes information about real data.

Task

Function package

The query functions use full data area and buffer data area from the data packet for proper data access. Suppose there is a one-dimensional data set of size 10 and it is divided into two pieces. Therefore, if the user tries to access the right buffer using dot query(,x=8,), then the function changes to data[8-buffer data range.x start].

In the input partitioning model, each function has the same scope of work, but each data packet in the function argument has a different scope of data. In an in-out partitioning model with identical shapes, work volumes and data packets have the same work volume and data volume.

Memcpy package

Process Design

Execution Unit

In the Python case, it is possible to run the job function with additional outer loops for the worker range because the job function has a Python-like syntax. However, in the PyCUDA case, the worker function is not directly executable on the GPU, so it needs a translation step that converts it to CUDA code. In the analysis step, it defines the input, intermediate, and output data types and variables for all fields.

For the next step, it translates the work function code into target programming code such as CUDA using the information from the parsing step. Additionally, it recursively examines small blocks to determine the data types for each range. Inside the block, data type inference is performed using Python operator precedence, arithmetic conversions, and.

For example, if a function is found, then the output data types are taken from the dictionary of the function and the data types of the input variables. For example, GPU code requires a strict data type declaration for each data, so it adds data type declarations within each scope. For example, GPU kernel code does not allow function name overloading, so a different kernel name is needed for each data type.

Pipeline Optimization

The corresponding C++ version, which is provided in the supplementary material, requires approx. 160 lines of code (including the CUDA- and MPI-related lines), and in addition required knowledge of CUDA and MPI to write. The numbers in the cells are the significant number of lines, time in seconds, and scalability when the number of GPUs increases. The results for Volren in Table 1 show that it has good scalability with two GPUs (1.8×), but only 6.6× scalability with 12 GPUs.

In benchmarks, Vivaldi shows comparable scalability to the manual C++ version, but the absolute computation time is slower. In the benchmark, the in-and-out halo communicates every 10 iterations, so there are 10 times more halo communication tasks. This contributed to the creation of a huge scheduling overhead in the Heatflow input halo benchmarks, because a 40x faster backend results in 40x less overhead.

However, more translation implementations will be added in the future, such as OpenCL, and Vivaldi may support AMD GPUs or Xeon Phis. Furthermore, the Vivaldi language is designed for volume rendering and processing, but the target domain can be extended in the future for other visualization purposes such as meshes, vectors, and so on. Currently, Vivaldi has a lot of room for improvement, for example in the areas of the scheduler, the translator, the compiler and the target domain.

Figure 13: Examples of distributed parallel volume rendering.
Figure 13: Examples of distributed parallel volume rendering.

Gambar

Figure 1: Vivaldi version of parallel maximum intensity projection volume rendering using four GPUs on a GPU cluster.
Figure 2: Parallel processing models are specified by how the data is split. They are well suited for visualization pipelines.
Figure 3: Example of a perspective iterator that automatically calculates volume intersection points and travels inside the volume
Figure 4: Example of a 3D mean filter using a cube iterator.
+7

Referensi

Dokumen terkait

5, 2014 ラン藻の代謝改変によるバイオプラスチック増産 ラン藻代謝工学の新展開 ラン藻は,酸素発生型の光合成を行う細菌である(図 1).淡水,海水,土壌から深海や温泉に至るまで,あら ゆる環境に生育していることが知られている.光合成を 行うことで,光エネルギーと大気中の二酸化炭素の利用 が可能であることから,ラン藻を用いたバイオエネル