Radeon Pro Solid State Graphics Api User Manual

Summary of Pro Solid State Graphics

  • Page 1

    Solid state graphics (ssg) api user manual.

  • Page 2

    Rev. 1.01 2 contents 1 introduction .......................................................................................................................................... 3 2 requirements ...............................................................................................................

  • Page 3

    Rev. 1.01 3 1 introduction the radeon™ pro ssg software library enables peer-to-peer (p2p) data transfers between gpu and radeon on board ssd devices. It allows a methodology to read os file data from ssds to opencl™, opengl® and directx® buffers with very low-latency p2p communication. The developm...

  • Page 4

    Rev. 1.01 4 3.2 clgetssgfileobjectinfoamd the clgetssgfileobjectinfoamd function returns information about a file object. File [in] specifies the file object of query. Param_name [in] s pecifies the information to query. The table below provides a list of supported param_name types and the informati...

  • Page 5

    Rev. 1.01 5 cl_success the function executed successfully. Cl_invalid_file_object_amd the file is invalid for opencl. 3.4 clreleasessgfileobjectamd the clreleasessgfileobjectamd function decrements the file-object reference count. File [in] specifies the file object to be released. Return value desc...

  • Page 6

    Rev. 1.01 6 buffer_offset [in] offset (in bytes) in the buffer object to which the function is writing. It must be a multiple of cl_file_block_size_amd. Size [in] size (in bytes) of data being read. It must be a multiple of cl_file_block_size_amd. If the file size isn’t a multiple of the block size,...

  • Page 7

    Rev. 1.01 7 cl_mem_object_allocation_failure memory failed to allocate for data store associated with buffer. 3.6 clenqueuewritessgfileamd the clenqueuewritessgfileamd function writes directly from a cl memory object to a file object. Command_queue [in] valid host command queue in which the write co...

  • Page 8

    Rev. 1.01 8 synchronization points, and the contexts associated with events in event_wait_list and command_queue must be the same. Memory associated with event_wait_list can be reused or freed-up after the function returns. Event [out, optional] returns an event object that identifies the clenqueuew...

  • Page 9

    Rev. 1.01 9 copy the internal device memory to the destination buffer. Internal device copies will execute at full memory-controller speed, which varies from 100 gb/s to 500 gb/s depending on the gpu type. • the copy size, buffer offset and file offset must adhere to the ssd’s alignment restrictions...

  • Page 10

    Rev. 1.01 10 5 amd code sample for opencl // create file. Cl_int clstatus = cl_success ; cl_file_amd clssgfile = clcreatessgfileobjectamd (m_clcontext, cl_file_read_only_amd, file_name, &clstatus); if (clstatus != cl_success ) { s td::cout "error: unable to create file handle." return ; } // get the...

  • Page 11

    Rev. 1.01 11 6 opengl® extension specification this opengl extension accelerates the data transfer between gpu and ssd devices. It introduces a new file object that operates on the file in an ssd. The result of a file operation (read or write) can be any named buffer object. Gl file objects employ t...

  • Page 12

    Rev. 1.01 12 file [in] the gl file for which properties are required. Pname [in] the property information being requested. It must be gl_file_block_size_amd or gl_file_size_amd. Params [out] the value of the property requested. Error description invalid_value the file object is invalid. Invalid_enum...

  • Page 13

    Rev. 1.01 13 size [in] the amount of information (in bytes) being read. It must be a multiple of gl_file_block_size_amd. If the file size is not a multiple of the block size, read the end of the file by aligning the read size with the next block multiple beyond the file size. Sync [in] sync the obje...

  • Page 14

    Rev. 1.01 14 fileoffset [in] file location to which data (of width size, in bytes) will be written. It must be a multiple of gl_file_block_size_amd. Size [in] amount of information (in bytes) being written. It must be a multiple of gl_file_block_size_amd. If the file size is not a multiple of the bl...

  • Page 15

    Rev. 1.01 15 • the glnamedbufferstorage() api can also allocate local invisible memory; just set the gl_map_read_bit or gl_map_write_bit flag without setting gl_map_persistent_bit. • opengl also provides other ways to allocate local invisible memory: glbufferdata and glbuffersubdata. • only when the...

  • Page 16

    Rev. 1.01 16 8 amd code sample for opengl // create file: file_name is the file path. Glfilehandleamd hssgfilefile = glcreatefileamd( file_name, gl_read_only); if ( hssgfilefile != null ) { s td::cout "error: unable to open the file." return ; } // get the file-size information. Gluint64 filesize = ...

  • Page 17

    Rev. 1.01 17 9 directx™ 11 extension specification the directx 11 extension accelerates the data transfer between gpu and ssd devices. It introduces a new interface that operates on the file in an ssd. The result of the operation (read or write) can be any named buffer object. The directx file objec...

  • Page 18

    Rev. 1.01 18 9.1 getextensionversion the getextensionversion function returns the ssg extension version information. Pextversion [in] address pointer to the returned version information. Remarks the extversionmajor/minor values will increase as the extension interface expands to add new functions. T...

  • Page 19

    Rev. 1.01 19 hfile [in] handle for the ssg file to close. Remarks this function will invalidate the hfile handle, which then becomes unusable. Avoid calling this function if an asynchronous transfer is in progress. Return value description s_ok the function succeeded. E_handle the handle is invalid ...

  • Page 20

    Rev. 1.01 20 return value s_ok the function succeeded. 9.6 deleteevent the deleteevent function deletes a synchronization event employed during asynchronous file transfers. Hevent [in] ssg event handle to be deleted. Remarks avoid deleting an event handle if used in asynchronous file transfers but t...

  • Page 21

    Rev. 1.01 21 9.8 readbufferfromfile the readbufferfromfile function transfers file information to the d3d11 buffer. The call can be synchronous or asynchronous, and it takes one or more regions to fill the destination buffer. Splitting the request into multiple smaller regions can improve performanc...

  • Page 22

    Rev. 1.01 22 9.9 writebuffertofile the writebuffertofile function transfers information from the d3d11 buffer to a file. The call can be synchronous or asynchronous. It takes one or more regions for writing to the file. Splitting the request into multiple smaller regions can improve performance. Not...

  • Page 23

    Rev. 1.01 23 10 amd code sample for directx® // create module handle. Hmodule hdxxdll = getmodulehandle(dxx_dll_name); if (hdxxext == null) { s td::cout "error: unable to load dx library." return ; } // initial function pointer from module. Pfnamddxextcreate11 pamddxextcreate = reinterpret_cast(getp...

  • Page 24

    Rev. 1.01 24 amddxlfregiondesc regiondesc; regiondesc.Fileoffset = file_offset; regiondesc.Bufferoffset = buff_offset; regiondesc.Regionsize = dxlffileinfo.Blocksize; // read information from the file: buff_offset, size_to_read and file_offset must // align with the sector size. Hr = dxssgext->readb...

  • Page 25

    Rev. 1.01 25 disclaimer the information contained herein is for informational purposes only, and is subject to change without notice. While every precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissions and typographical errors, and amd is under...