Skip to content

Some improvements to code display #19

@Keluaa

Description

@Keluaa

SASS:

  • option to remove ; Location comments
  • too many mangled names, can we unmangle them? can we simplify them?

PTX:

  • { blocks } are not indented
  • same problem with mangled names
  • calls are quite unreadable and unrecognizable at a quick glance:
	call.uni 
	throw_boundserror, 
	(
	param0
	);

LLVM IR:

  • again, mangled names

Julia IR:

  • This CUDA code has some nasty "inline modules" lines, what can we do about them?
using KernelAbstractions
@kernel function test_ka(a, b, c)
           i = @index(Global, Linear)
           s = @localmem eltype(a) 100
           l = @private eltype(a) 3
           s[i] = a[i]
           @synchronize()
           l[1] = mod1(i * 42, 100)
           l[2] = mod1(i * 46, 100)
           l[3] = mod1(abs(Int(c[i])) * 465, 100)
           a[i] = b[i] * c[i] - s[mod1(i + 42, 100)]
           b[i] = c[i] - a[i] + s[mod1(i + 27, 100)]
           c[i] = b[i] * a[i] * s[mod1(i + 37, 100)]
end
a = CUDA.rand(Int64, 100); b = CUDA.rand(Int64, 100); c = CUDA.rand(Int64, 100);
@code_for type=:cuda_typed debuginfo=:none test_ka(CUDABackend(), 100)(a, b, c; ndrange=size(a))

In general:

  • The debuginfo=:none option is quite useful for LLVM IR and typed Julia IR, but all other types are unsupported, so you must remove/add it every time. Having a generic option to enable "less debug info" (and shorter than debuginfo=:none) would be good

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions