Skip to content

CUDA PTX inline asm listing fails internal exception for -e stmt_html #9196

Description

@antonysigma

Description

Error log:

Unhandled exception: halide/src/StmtToHTML.cpp:841 Condition failed: current_id != -1

CUDA PTX listing that causes the current_id to reset:

Image Image

I am trying to create a minimum reproducible case in the meantime. My hunch is that StmtToHTML.cpp does not reference count the nested braces, and instead treating { as a new CUDA kernel.

Related to: #7843 .

Reproducing case

.visible .entry _kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x (
    .param .u64 _kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x_param_0,
    .param .u64 _kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x_param_1,
    .param .u64 _kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x_param_2,
    .param .u64 _kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x_param_3
)                                       // @_kernel_total_field_ft_mux_s0___outermost___outermost_v81_block_id_x
{
...
$L__BB14_14:                            // %.lr.ph43
                                        //   Parent Loop BB14_1 Depth=1
                                        //     Parent Loop BB14_2 Depth=2
                                        //       Parent Loop BB14_3 Depth=3
                                        //         Parent Loop BB14_4 Depth=4
                                        // =>        This Inner Loop Header: Depth=5
    ld.const.u32 	%r131, [%rd37];
    // begin inline asm
{
... [assertion failure]

How did you get Halide?

None

Halide version

18.0.0

Halide commit (if known)

No response

Target

x86-64-linux-cuda-cuda_capability_75

Operating system

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions