IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Python function

set_virtual_device_target_arch

set_virtual_device_target_arch()โ€‹

max.driver.set_virtual_device_target_arch(arch: str) โ†’ None

source

Sets the target GPU architecture for virtual devices in compile-only mode.

This specifies the GPU architecture (e.g., โ€œsm_80โ€, โ€œsm_90โ€) that virtual devices will target when compiling code. Must be called before creating virtual devices via set_virtual_device_count().

Parameters:

arch (str) โ€“ The target GPU architecture string (e.g., โ€œsm_80โ€ for Ampere/A100, โ€œsm_90โ€ for Hopper/H100).