€•9Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ(/translations/zh_CN/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/zh_TW/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/it_IT/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ja_JP/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/ko_KR/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ(/translations/sp_SP/gpu/amdgpu/debugging”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ GPU Debugging”h]”hŒ GPU Debugging”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒB/var/lib/git/docbuild/linux/Documentation/gpu/amdgpu/debugging.rst”h Kubh¢)”}”(hhh]”(h§)”}”(hŒGPUVM Debugging”h]”hŒGPUVM Debugging”…””}”(hhºhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh·hžhhŸh¶h KubhŒ paragraph”“”)”}”(hŒsTo aid in debugging GPU virtual memory related problems, the driver supports a number of options module parameters:”h]”hŒsTo aid in debugging GPU virtual memory related problems, the driver supports a number of options module parameters:”…””}”(hhÊhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khh·hžhubhÉ)”}”(hŒO`vm_fault_stop` - If non-0, halt the GPU memory controller on a GPU page fault.”h]”(hŒtitle_reference”“”)”}”(hŒ`vm_fault_stop`”h]”hŒ vm_fault_stop”…””}”(hhÞhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhhØubhŒ@ - If non-0, halt the GPU memory controller on a GPU page fault.”…””}”(hhØhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hh·hžhubhÉ)”}”(hŒW`vm_update_mode` - If non-0, use the CPU to update GPU page tables rather than the GPU.”h]”(hÝ)”}”(hŒ`vm_update_mode`”h]”hŒvm_update_mode”…””}”(hhúhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜhhöubhŒG - If non-0, use the CPU to update GPU page tables rather than the GPU.”…””}”(hhöhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K hh·hžhubeh}”(h]”Œgpuvm-debugging”ah ]”h"]”Œgpuvm debugging”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒDecoding a GPUVM Page Fault”h]”hŒDecoding a GPUVM Page Fault”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjhžhhŸh¶h KubhÉ)”}”(hŒ¶If you see a GPU page fault in the kernel log, you can decode it to figure out what is going wrong in your application. A page fault in your kernel log may look something like this:”h]”hŒ¶If you see a GPU page fault in the kernel log, you can decode it to figure out what is going wrong in your application. A page fault in your kernel log may look something like this:”…””}”(hj+hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KhjhžhubhŒ literal_block”“”)”}”(hX”[gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:3 pasid:32777, for process glxinfo pid 2424 thread glxinfo:cs0 pid 2425) in page starting at address 0x0000800102800000 from IH client 0x1b (UTCL2) VM_L2_PROTECTION_FAULT_STATUS:0x00301030 Faulty UTCL2 client ID: TCP (0x8) MORE_FAULTS: 0x0 WALKER_ERROR: 0x0 PERMISSION_FAULTS: 0x3 MAPPING_ERROR: 0x0 RW: 0x0”h]”hX”[gfxhub0] no-retry page fault (src_id:0 ring:24 vmid:3 pasid:32777, for process glxinfo pid 2424 thread glxinfo:cs0 pid 2425) in page starting at address 0x0000800102800000 from IH client 0x1b (UTCL2) VM_L2_PROTECTION_FAULT_STATUS:0x00301030 Faulty UTCL2 client ID: TCP (0x8) MORE_FAULTS: 0x0 WALKER_ERROR: 0x0 PERMISSION_FAULTS: 0x3 MAPPING_ERROR: 0x0 RW: 0x0”…””}”hj;sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1j9hŸh¶h KhjhžhubhÉ)”}”(hŒÄFirst you have the memory hub, gfxhub and mmhub. gfxhub is the memory hub used for graphics, compute, and sdma on some chips. mmhub is the memory hub used for multi-media and sdma on some chips.”h]”hŒÄFirst you have the memory hub, gfxhub and mmhub. gfxhub is the memory hub used for graphics, compute, and sdma on some chips. mmhub is the memory hub used for multi-media and sdma on some chips.”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K$hjhžhubhÉ)”}”(hXNNext you have the vmid and pasid. If the vmid is 0, this fault was likely caused by the kernel driver or firmware. If the vmid is non-0, it is generally a fault in a user application. The pasid is used to link a vmid to a system process id. If the process is active when the fault happens, the process information will be printed.”h]”hXNNext you have the vmid and pasid. If the vmid is 0, this fault was likely caused by the kernel driver or firmware. If the vmid is non-0, it is generally a fault in a user application. The pasid is used to link a vmid to a system process id. If the process is active when the fault happens, the process information will be printed.”…””}”(hjYhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K(hjhžhubhÉ)”}”(hŒ9The GPU virtual address that caused the fault comes next.”h]”hŒ9The GPU virtual address that caused the fault comes next.”…””}”(hjghžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K.hjhžhubhÉ)”}”(hŒTThe client ID indicates the GPU block that caused the fault. Some common client IDs:”h]”hŒTThe client ID indicates the GPU block that caused the fault. Some common client IDs:”…””}”(hjuhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K0hjhžhubhŒ bullet_list”“”)”}”(hhh]”(hŒ list_item”“”)”}”(hŒ3CB/DB: The color/depth backend of the graphics pipe”h]”hÉ)”}”(hjŒh]”hŒ3CB/DB: The color/depth backend of the graphics pipe”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K3hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒCPF: Command Processor Frontend”h]”hÉ)”}”(hj£h]”hŒCPF: Command Processor Frontend”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K4hj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒCPC: Command Processor Compute”h]”hÉ)”}”(hjºh]”hŒCPC: Command Processor Compute”…””}”(hj¼hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K5hj¸ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒCPG: Command Processor Graphics”h]”hÉ)”}”(hjÑh]”hŒCPG: Command Processor Graphics”…””}”(hjÓhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K6hjÏubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒTCP/SQC/SQG: Shaders”h]”hÉ)”}”(hjèh]”hŒTCP/SQC/SQG: Shaders”…””}”(hjêhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K7hjæubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒSDMA: SDMA engines”h]”hÉ)”}”(hjÿh]”hŒSDMA: SDMA engines”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K8hjýubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒ VCN: Video encode/decode engines”h]”hÉ)”}”(hjh]”hŒ VCN: Video encode/decode engines”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K9hjubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubj‰)”}”(hŒJPEG: JPEG engines ”h]”hÉ)”}”(hŒJPEG: JPEG engines”h]”hŒJPEG: JPEG engines”…””}”(hj/hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K:hj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhj…hžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”Œbullet”Œ-”uh1jƒhŸh¶h K3hjhžhubhÉ)”}”(hŒ8PERMISSION_FAULTS describe what faults were encountered:”h]”hŒ8PERMISSION_FAULTS describe what faults were encountered:”…””}”(hjKhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h Khj\ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjYhžhhŸh¶h Nubj‰)”}”(hŒ#bit 1: the PTE read bit was not set”h]”hÉ)”}”(hjuh]”hŒ#bit 1: the PTE read bit was not set”…””}”(hjwhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K?hjsubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjYhžhhŸh¶h Nubj‰)”}”(hŒ$bit 2: the PTE write bit was not set”h]”hÉ)”}”(hjŒh]”hŒ$bit 2: the PTE write bit was not set”…””}”(hjŽhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h K@hjŠubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjYhžhhŸh¶h Nubj‰)”}”(hŒ'bit 3: the PTE execute bit was not set ”h]”hÉ)”}”(hŒ&bit 3: the PTE execute bit was not set”h]”hŒ&bit 3: the PTE execute bit was not set”…””}”(hj¥hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KAhj¡ubah}”(h]”h ]”h"]”h$]”h&]”uh1jˆhjYhžhhŸh¶h Nubeh}”(h]”h ]”h"]”h$]”h&]”jIjJuh1jƒhŸh¶h K>hjhžhubhÉ)”}”(hŒHFinally, RW, indicates whether the access was a read (0) or a write (1).”h]”hŒHFinally, RW, indicates whether the access was a read (0) or a write (1).”…””}”(hj¿hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KChjhžhubhÉ)”}”(hXIn the example above, a shader (cliend id = TCP) generated a read (RW = 0x0) to an invalid page (PERMISSION_FAULTS = 0x3) at GPU virtual address 0x0000800102800000. The user can then inspect their shader code and resource descriptor state to determine what caused the GPU page fault.”h]”hXIn the example above, a shader (cliend id = TCP) generated a read (RW = 0x0) to an invalid page (PERMISSION_FAULTS = 0x3) at GPU virtual address 0x0000800102800000. The user can then inspect their shader code and resource descriptor state to determine what caused the GPU page fault.”…””}”(hjÍhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KEhjhžhubeh}”(h]”Œdecoding-a-gpuvm-page-fault”ah ]”h"]”Œdecoding a gpuvm page fault”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubh¢)”}”(hhh]”(h§)”}”(hŒUMR”h]”hŒUMR”…””}”(hjæhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hjãhžhhŸh¶h KKubhÉ)”}”(hŒç`umr `_ is a general purpose GPU debugging and diagnostics tool. Please see the umr `documentation `_ for more information about its capabilities.”h]”(hŒ reference”“”)”}”(hŒ6`umr `_”h]”hŒumr”…””}”(hjúhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œumr”Œrefuri”Œ-https://gitlab.freedesktop.org/tomstdenis/umr”uh1jøhjôubhŒtarget”“”)”}”(hŒ0 ”h]”h}”(h]”Œid1”ah ]”h"]”Œumr”ah$]”h&]”Œrefuri”j uh1j Œ referenced”KhjôubhŒN is a general purpose GPU debugging and diagnostics tool. Please see the umr ”…””}”(hjôhžhhŸNh Nubjù)”}”(hŒ6`documentation `_”h]”hŒ documentation”…””}”(hj hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”Œname”Œ documentation”j Œ#https://umr.readthedocs.io/en/main/”uh1jøhjôubj )”}”(hŒ& ”h]”h}”(h]”Œ documentation”ah ]”h"]”Œ documentation”ah$]”h&]”Œrefuri”j0uh1j jKhjôubhŒ- for more information about its capabilities.”…””}”(hjôhžhhŸNh Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÈhŸh¶h KMhjãhžhubeh}”(h]”Œumr”ah ]”h"]”h$]”jah&]”uh1h¡hh£hžhhŸh¶h KKjKubeh}”(h]”Œ gpu-debugging”ah ]”h"]”Œ gpu debugging”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”jzŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jTjQjjjàjÝŒumr”jj:j7uŒ nametypes”}”(jT‰j‰jà‰j¾ˆj:ˆuh}”(jQh£jh·jÝjjJjãjjj7j1uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”jˆKs…”R”Œparse_messages”]”hŒsystem_message”“”)”}”(hhh]”hÉ)”}”(hŒ&Duplicate implicit target name: "umr".”h]”hŒ*Duplicate implicit target name: “umrâ€.”…””}”(hjâhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÈhjßubah}”(h]”h ]”h"]”h$]”h&]”jaŒlevel”KŒtype”ŒINFO”Œsource”h¶Œline”Kuh1jÝhjãhžhhŸh¶h KPubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.