StanfordLegion / legion

The Legion Parallel Programming System
https://legion.stanford.edu
Apache License 2.0
680 stars 145 forks source link

Regent: debug symbols broken with field polymorphic cuda tasks #1009

Open syamajala opened 3 years ago

syamajala commented 3 years ago

The following example fails to run when using llvm 9 and cuda with field polymorphic tasks and Regent debug symbols:

import "regent"
local c = regentlib.c

struct Fields
{
  A : double,
  B : double,
  C : double
}

struct AddFields
{
  F1 : double,
  F2 : double
}

__demand(__cuda)
task add(lr : region(ispace(int3d), AddFields))
where
  reads writes (lr)
do
  for idx in lr.ispace do
    lr[idx].F1 += 1
    lr[idx].F2 += 2
  end
end

task main()
  var lr = region(ispace(int3d, {2, 2, 2}), Fields)
  fill(lr.{A, B, C}, 0)

  add(lr.{F1=A, F2=B})
end

regentlib.start(main)

Here is the error message:

[0 - 15555552a780]    0.000000 {5}{gpu}: Failed to load CUDA module! Error log: ptxas application ptx input, line 29254; fatal   : Parsing error near '-': syntax error
ptxas fatal   : Ptx assembly aborted due to errors
CU: cuModuleLoadDataEx = 218 (CUDA_ERROR_INVALID_PTX): a PTX JIT compilation failed
elliottslaughter commented 3 years ago

We've been seeing a number of failures like this:

The latter two, as best I can tell, use neither debug symbols or field polymorphism, so I'm not sure what the common connection is at the moment.