Giter VIP home page Giter VIP logo

Comments (3)

piyueh avatar piyueh commented on August 30, 2024

@manopapad I 'm not sure if the following code snippet is relevant to this issue or the original issue (#16):

import legate.numpy as np
a = np.arange(49).reshape((7, 7))
a[2:-2, 0] = a[2:-2, 2]

I got an error from this test code:

[0 - 7fe46cbbf700]    0.963354 {5}{runtime}: [error 356] LEGION ERROR: Aliased and interfering region requirements for individual tasks are not permitted. Region requirements 0 and 1 of task legate::numpy::CopyTask<long> (UID 7) in parent task legion_python_main (UID 1) are interfering. (from file /home/u00u92m5kmdwylez30357/Downloads/legate/legate.core/legion/runtime/legion/legion_tasks.cc:5921)
For more information see:
http://legion.stanford.edu/messages/error_code.html#error_code_356

Signal 6 received by node 0, process 208786 (thread 7fe46cbbf700) - obtaining backtrace
Signal 6 received by process 208786 (thread 7fe46cbbf700) at: stack trace: 19 frames
  [0] = /lib/x86_64-linux-gnu/libc.so.6(+0x3f040) [0x7fe47752d040]
  [1] = /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7fe47752cfb7]
  [2] = /lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7fe47752e921]
  [3] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(+0x774ff6) [0x7fe479744ff6]
  [4] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::IndividualTask::report_interfering_requirements(unsigned int, unsigned int)+0xc8) [0x7fe4794927c8]
  [5] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::TaskOp::perform_intra_task_alias_analysis(bool, Legion::Internal::LegionTrace*, std::vector<Legion::Internal::RegionTreePath, std::allocator<Legion::Internal::RegionTreePath> >&)+0x35c) [0x7fe4794b21dc]
  [6] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::IndividualTask::trigger_prepipeline_stage()+0x3bf) [0x7fe4794c381f]
  [7] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::Operation::execute_prepipeline_stage(unsigned int, bool)+0x266) [0x7fe479418b96]
  [8] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::Operation::execute_dependence_analysis()+0x73) [0x7fe47944c893]
  [9] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::SpeculativeOp::execute_dependence_analysis()+0x1d5) [0x7fe4794611a5]
  [10] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::MemoizableOp<Legion::Internal::SpeculativeOp>::execute_dependence_analysis()+0xec) [0x7fe47948952c]
  [11] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::InnerContext::process_dependence_stage()+0x18c) [0x7fe4794f040c]
  [12] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/liblegion.so(Legion::Internal::Runtime::legion_runtime_task(void const*, unsigned long, void const*, unsigned long, Realm::Processor)+0x5ea) [0x7fe4797b0f8a]
  [13] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/librealm.so(+0x4323e1) [0x7fe47811d3e1]
  [14] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/librealm.so(+0x2ada93) [0x7fe477f98a93]
  [15] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/librealm.so(+0x2adc96) [0x7fe477f98c96]
  [16] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/librealm.so(+0x2b0833) [0x7fe477f9b833]
  [17] = /home/u00u92m5kmdwylez30357/.local/anaconda/envs/torchswe-legate/lib/librealm.so(+0x294e92) [0x7fe477f7fe92]
  [18] = /lib/x86_64-linux-gnu/libc.so.6(+0x587b0) [0x7fe4775467b0]

Only errors from Legion. No errors & traceback from Python. Ran with -lg:numpy:test flag.

However, if a is initialized directly using np.random.random((7, 7)), it works fine..

from cunumeric.

manopapad avatar manopapad commented on August 30, 2024

Thank you for finding this. It turns out the simple overlap check above actually captures the behavior of the partitioning code in most cases (the partitioning code also takes the convex hull of the boundary points on the base region), so I reinstated it. Now instead of the Legion error you should get a NotImplementedError: copies between overlapping sub-arrays. The error message is not the whole story, since the overlap is not coming from the actual slice expressions (obviously a[2:-2, 0] and a[2:-2, 2] do not overlap), but from the way Legion implements 2d views over 1d base arrays.

Closing this issue, since the overlap check is already good enough. #40 tracks work on actually supporting overlapping array copies. @piyueh: So we know what to prioritize, is this feature useful for your actual application?

from cunumeric.

piyueh avatar piyueh commented on August 30, 2024

@manopapad Currently, I haven't encountered this issue in my application.

from cunumeric.

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.