Code Monkey home page Code Monkey logo

Comments (6)

elliottslaughter avatar elliottslaughter commented on July 17, 2024

Should be fixed in master.

from legion.

syamajala avatar syamajala commented on July 17, 2024

Hitting a new error after pulling these changes:

...dbo/legion/language/src/regent/optimize_index_launches.t:1429: assertion failed!
stack traceback:
        [C]: in function 'assert'
        ...dbo/legion/language/src/regent/optimize_index_launches.t:1429: in function 'insert_dynamic_check'
        ...dbo/legion/language/src/regent/optimize_index_launches.t:1797: in function 'map_node_postorder'
        .../vsyamaj/legion_s3d_dbo/legion/language/src/common/ast.t:514: in function 'map_node_postorder'
        .../vsyamaj/legion_s3d_dbo/legion/language/src/common/ast.t:505: in function 'map_node_postorder'
        .../vsyamaj/legion_s3d_dbo/legion/language/src/common/ast.t:505: in function 'top_task'
        ...dbo/legion/language/src/regent/optimize_index_launches.t:1846: in function <...dbo/legion/language/src/regent/optimize_index_launches.t:1840>
        ...legion_s3d_dbo/legion/language/src/regent/passes_hooks.t:41: in function 'optimize'
        ...yamaj/legion_s3d_dbo/legion/language/src/regent/passes.t:52: in function <...yamaj/legion_s3d_dbo/legion/language/src/regent/passes.t:48>
        test.rg:28: in main chunk

Here is a reproducer:

import "regent"

fspace SigmaFields
{
  S : double,
  SInv : double
}

__demand(__inline)
task is_rank1d(color : int3d)
  var proc_grid_size = int3d{2, 2, 2}
  return color.x + proc_grid_size.x*(color.y + proc_grid_size.z*color.z)
end

task compute_inverse(lr_sigma : region(ispace(int2d), SigmaFields))
where
  reads (lr_sigma.{S}),
  reads writes(lr_sigma.{SInv})
do

  for idx in lr_sigma.ispace do
    lr_sigma[idx].SInv = lr_sigma[idx].S
  end

end


task main()
  var global_grid_size = int3d{64, 64, 64}
  var is_grid = ispace(int3d, global_grid_size)

  var proc_grid_size = int3d{2, 2, 2}
  var blocking_factor = global_grid_size / proc_grid_size

  var is_bounds = is_grid.bounds
  var is_rank = ispace(int3d, int3d{
                         (((is_bounds.hi.x - is_bounds.lo.x) + blocking_factor.x) / blocking_factor.x),
                         (((is_bounds.hi.y - is_bounds.lo.y) + blocking_factor.y) / blocking_factor.y),
                         (((is_bounds.hi.z - is_bounds.lo.z) + blocking_factor.z) / blocking_factor.z)},
                       int3d{0, 0, 0})

  var iz_rank1d = ispace(int1d, proc_grid_size.x*proc_grid_size.y*proc_grid_size.z)

  var ranks = is_rank.volume
  var r_dim = 20

  var t2d : transform(2, 1)
  t2d[{0, 0}] = r_dim
  t2d[{1, 0}] = r_dim

  var e2d = rect2d{ int2d{0, 0}, int2d{r_dim - 1, r_dim - 1} }

  var lr_Sigma = region(ispace(int2d, int2d{r_dim * ranks, r_dim * ranks}), SigmaFields)
  var lp_Sigma_rank = restrict(disjoint, complete, lr_Sigma, t2d, e2d, iz_rank1d)

  fill(lr_Sigma.{S}, 2.0)
  fill(lr_Sigma.{SInv}, 1/2)

  __demand(__index_launch)
  for color in is_rank do
    compute_inverse(lp_Sigma_rank[is_rank1d(color)])
  end

end

regentlib.start(main)

from legion.

elliottslaughter avatar elliottslaughter commented on July 17, 2024

I'll look at fixing this, but you should be able to work around for now with -findex-launch-dynamic 0 -foverride-demand-index-launch 1.

from legion.

syamajala avatar syamajala commented on July 17, 2024

That works but Im running into this issue: #1298

from legion.

elliottslaughter avatar elliottslaughter commented on July 17, 2024

The dynamic projection functor issue should be fixed in master with 1aa0346. I'll deal with the other bug in its own issue.

from legion.

syamajala avatar syamajala commented on July 17, 2024

Seems to be working now. Thanks!

from legion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.