@@ -205,3 +205,55 @@ not enabled in the ``Target``, an exception will be raised.
205205 * - ``supports_int64 ``
206206 -
207207 - Int64
208+
209+
210+ Vulkan-Specific Environment Variables
211+ -------------------------------------
212+
213+ Both the SPIR-V code generation and the Vulkan runtime have
214+ environment variables that can modify some of the runtime behavior.
215+ These are intended for debugging purposes, both to more easily test
216+ specific code paths, and to output more information as needed. All
217+ boolean flags are true if the environment variable is set to a
218+ non-zero integer. An unset variable, the integer zero, or an empty
219+ string are all false boolean flags.
220+
221+ .. _VK_KHR_push_descriptor : https://khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_push_descriptor.html
222+
223+ .. _VK_KHR_descriptor_update_template : https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_descriptor_update_template.html
224+
225+ .. _VK_KHR_dedicated_allocation : https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_dedicated_allocation.html
226+
227+ .. _VkMemoryDedicatedRequirements : https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkMemoryDedicatedRequirements.html
228+
229+ .. _Vulkan validation layers : https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/blob/master/layers/README.md
230+
231+ .. _spvValidate : https://github.com/KhronosGroup/SPIRV-Tools#validator
232+
233+
234+ * ``TVM_VULKAN_DISABLE_PUSH_DESCRIPTOR `` - A boolean flag. If true,
235+ TVM will explicitly allocate descriptors, and will not use the
236+ `VK_KHR_push_descriptor `_ or `VK_KHR_descriptor_update_template `_
237+ extensions. If false, TVM will decide whether to use these
238+ extensions based on their availability.
239+
240+ * ``TVM_VULKAN_DISABLE_DEDICATED_ALLOCATION `` - A boolean flag. If
241+ true, TVM will not mark memory allocations as being dedicated
242+ allocations, and will not use the `VK_KHR_dedicated_allocation `_
243+ extension. If false, TVM will decide whether memory allocations
244+ should be marked as dedicated based on the
245+ `VkMemoryDedicatedRequirements `_ for that buffer.
246+
247+ * ``TVM_VULKAN_ENABLE_VALIDATION_LAYERS `` - A boolean flag. If true,
248+ TVM will enable `Vulkan validation layers `_ that the device
249+ supports. If false, no validation layers are enabled.
250+
251+ * ``TVM_VULKAN_DISABLE_SHADER_VALIDATION `` - A boolean flag. If true,
252+ the SPIR-V shader validation done with `spvValidate `_ is skipped.
253+ If false (default), all SPIR-V shaders generated by TVM are
254+ validated with `spvValidate `_.
255+
256+ * ``TVM_VULKAN_DEBUG_SHADER_SAVEPATH `` - A path to a directory. If
257+ set to a non-empty string, the Vulkan codegen will save tir, binary
258+ SPIR-V, and disassembled SPIR-V shaders to this directory, to be
259+ used for debugging purposes.
0 commit comments