Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

an extension that adds a device side abort function #149

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Khronos SPIR-V Registry](https://www.khronos.org/registry/spir-v/).
1. [SPV_INTEL_split_barrier ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/INTEL/SPV_INTEL_split_barrier.html)
1. [SPV_KHR_ray_cull_mask ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_ray_cull_mask.html)
1. [SPV_KHR_fragment_shader_barycentric ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_fragment_shader_barycentric.html)
1. [SPV_EXT_device_side_abort ]( http://htmlpreview.github.io/?https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_EXT_device_side_abort.html)

## Non-Semantic Extended Instruction Set Specifications

Expand Down
97 changes: 97 additions & 0 deletions extensions/EXT/SPV_EXT_device_side_abort.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
:extension_name: SPV_EXT_device_side_abort

= {extension_name}

== Name Strings

{extension_name}

== Contact

To report problems with this extension, please open a new issue at:

https://github.com/KhronosGroup/SPIRV-Registry

== Contributors

Pekka Jääskeläinen, Parmance +
Henry Linjamäki, Parmance +
Brice Videau, Argonne National Laboratory

== Notice

Copyright (c) 2021-2022 The Khronos Group Inc. Copyright terms at
http://www.khronos.org/registry/speccopyright.html

== Status

Draft

== Version

[width="40%",cols="25,25"]
|========================================
| Last Modified Date | {docdate}
| Revision | 2
|========================================

== Dependencies

This extension is written against the SPIR-V Specification,
Version 1.5, Revision 3, Unified

This extension is written against the OpenCL Extended Instruction Set
Specification, Version 1.00, Revision 7

This extension requires SPIR-V 1.0.

== Overview

This extension adds a new instruction abort_platform to support
the cl_ext_device_side_abort OpenCL C extension.

== Extension Name

To use this extension within a SPIR-V module, the following
*OpExtension* must be present in the module:

[subs="attributes"]
----
OpExtension "{extension_name}"
----

== Modifications to the OpenCL Extended Instruction Set Specification, Version 1.00, Revision 4

Modify Section 2.8, "Misc instructions", adding the following new instruction
description:
+

*OpAbortPlatformEXT* +
+
Implements the semantics of the builtin abort_platform() of semantics are
defined by the cl_ext_device_side_abort OpenCL C extension: It stops the kernel
execution immediately and causes an abnormal unrecoverable termination of the
host process in a straightforward and immediate manner.
+
+
Calling the device side abort also causes the printf buffer to be flushed on
the host program's standard output before aborting the host process.
+
+
'Result Type' must be 'void'. +

=== Issues

None

Revision History
----------------

[cols="5,15,15,70"]
[grid="rows"]
[options="header"]
|========================================
|Rev|Date|Author|Changes
|2|2022-05-14|Pekka Jääskeläinen, Brice Videau|Changed to an 'ext' extension to promote multi-vendor adoption.
|1|2022-04-08|Pekka Jääskeläinen|Initial RFC version.
|========================================
Loading