PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_vsa.h File Reference

Virtual Systolic Array. More...

#include "prt.h"

Go to the source code of this file.

Data Structures

struct  prt_vsa_s
 Virtual Systolic Array (VSA) VSA contains global informationa about the system, a local communication proxy, an array of local worker threads, and an array of local accelerator devices. More...
 

Macros

#define PRT_VSA_MAX_VDPS_PER_NODE   10003
 The maximum number of VDPs per node. The size of the VSA's hash table of VDPs. Should be a prime number.
 
#define PRT_VSA_GPU_ALLOC_UNIT_SIZE   131072
 The size of segments allocated by the GPU memory allocator. Setting the unit size to 128 KB, which is 64 x 256 x sizeof(double).
 

Typedefs

typedef struct prt_mapping_s(* prt_vdp_mapping_t )(int *, void *, int, int)
 The function pointer for the VDP mapping function.
 
typedef struct prt_vsa_s prt_vsa_t
 Virtual Systolic Array (VSA) VSA contains global informationa about the system, a local communication proxy, an array of local worker threads, and an array of local accelerator devices.
 

Functions

prt_vsa_tprt_vsa_new (int num_threads, int num_devices, void *global_store, struct prt_mapping_s(*vdp_mapping)(int *, void *, int, int))
 Creates a new VSA. More...
 
void prt_vsa_delete (prt_vsa_t *vsa)
 Destroys a VSA. More...
 
void prt_vsa_vdp_insert (prt_vsa_t *vsa, struct prt_vdp_s *vdp)
 Inserts a VDP in a VSA. Destroys VDPs that do not belong to this node. Puts the VDP in the list of VDPs of the owner thread or device. Connects corresponding input and output channels of intra-node VDPs. Builds the list of channel connections to other nodes. For a device VDP, creates a CUDA stream with the cudaStreamNonBlocking flag. This indicates no synchronization with the default stream (stream 0). Stream 0 is not used anywere in PRT. More...
 
void prt_vsa_vdp_merge_channels (prt_vsa_t *vsa, struct prt_vdp_s *vdp)
 Connects corresponding input and output channels of intra-node VDPs. An input channel always overrides an output channel. This way the on/off switch of the input channel is preserved. More...
 
void prt_vsa_vdp_track_tags (prt_vsa_t *vsa, struct prt_vdp_s *vdp)
 Builds the list of channel connections to other nodes. More...
 
void prt_vsa_channel_tags (prt_vsa_t *vsa)
 Assigns channel tags. Builds the node-tag lookup. Destroys channel lists. More...
 
void prt_vsa_channel_streams (prt_vsa_t *vsa)
 Creates channel streams. More...
 
double prt_vsa_run (prt_vsa_t *vsa)
 Implements the VSA's production cycle. Launches worker threads. Sends the master thread in the proxy production cycle. Joins the worker threads. More...
 
void prt_vsa_config_set (prt_vsa_t *vsa, enum prt_config_param_e param, enum prt_config_value_e value)
 
void prt_vsa_thread_warmup_func_set (prt_vsa_t *vsa, void(*func)())
 Sets a thread warmup function. If set, the thread warmup function is called by each thread right after launching and before threads are barriered and the timer is started. Allows for excluding the time for initialization procedures of libraries, such as loading of dynamic libraries, internal memory allocations, possibly time consuming pinned memory allocations, etc. A NULL function pointer can be passed to remove the thread warmup function. More...
 
void prt_vsa_device_warmup_func_set (prt_vsa_t *vsa, void(*func)())
 Sets a device warmup function. If set, the device warmup function is called by each device right after launching and before devices are barriered and the timer is started. Allows for excluding the time for initialization procedures of libraries, such as loading of dynamic libraries, internal memory allocations, possibly time consuming pinned memory allocations, etc. A NULL function pointer can be passed to remove the device warmup function. More...
 
void prt_vsa_devices_warmup (prt_vsa_t *vsa)
 Calls the warmup function for all devices and synchronizes. More...
 

Detailed Description

Virtual Systolic Array.

Author
Jakub Kurzak

PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.

Definition in file prt_vsa.h.

Function Documentation

void prt_vsa_channel_streams ( prt_vsa_t vsa)

Creates channel streams.

Parameters
vsa– The VSA to create streams for.

Definition at line 469 of file prt_vsa.c.

void prt_vsa_channel_tags ( prt_vsa_t vsa)

Assigns channel tags. Builds the node-tag lookup. Destroys channel lists.

Parameters
vsa– The VSA to find the tags for.

Definition at line 432 of file prt_vsa.c.

void prt_vsa_devices_warmup ( prt_vsa_t vsa)

Calls the warmup function for all devices and synchronizes.

Parameters
vsa– The VSA to warmup devices for.

Definition at line 694 of file prt_vsa.c.

void prt_vsa_vdp_merge_channels ( prt_vsa_t vsa,
prt_vdp_t vdp 
)

Connects corresponding input and output channels of intra-node VDPs. An input channel always overrides an output channel. This way the on/off switch of the input channel is preserved.

Parameters
vsa– The VSA to merge channels within.
vdp– The VDP to merge channels for.

Definition at line 290 of file prt_vsa.c.

void prt_vsa_vdp_track_tags ( prt_vsa_t vsa,
prt_vdp_t vdp 
)

Builds the list of channel connections to other nodes.

Parameters
vsa– The VSA to track the tags within.
vdp– The VDP to track the tags for.

Definition at line 351 of file prt_vsa.c.