Skip to content

Commit

Permalink
Merge branch 'control_replication' into shardrefine
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsighter committed Oct 5, 2023
2 parents 8247c2a + 71d152d commit 522ef64
Show file tree
Hide file tree
Showing 28 changed files with 698 additions and 206 deletions.
13 changes: 8 additions & 5 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ Version 23.09.0 (September ??, 2023)
- Elide future maps in index launches
- Improvements to Pygion interop
* Realm
- Machine configuration API that allows applications to configure the machine model without using the command line
- Expose Realm managed CUDA/HIP stream to applications to launch GPU tasks without device-wise synchronization when hijack is disabled
- Update the timer to use of rdtsc for different processors
- Performance improvement for getting highest priority task available from any task queue
- Implementation of framebuffer memory with cuMemMap
- Add a machine configuration API that allows applications to configure
the machine model without using the command line
- Expose Realm managed CUDA/HIP stream to applications to launch GPU tasks
without device-wise synchronization when hijack is disabled
- Change timers to use rdtsc
- Improve performance for getting highest priority task available in any
task queue
- Implement framebuffer memory with `cuMemMap`
- Initial work for moving STL dependencies to header only

Version 23.06.0 (June 28, 2023)
Expand Down
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,17 @@ if(NOT WIN32)
option(REALM_LIMIT_SYMBOL_VISIBILITY "hide private symbols in realm" ON)
endif()

# Only enable shm on linux and if GASNET1 is not available.
# OSX is not well tested yet, so disable by default for the time being
# GASNET1 does not allow communication before network attach, which is needed
# in order to coordinate a job identifier required to set up named system
# resources
if (UNIX AND NOT APPLE AND NOT REALM_USE_GASNET1)
option(REALM_USE_SHM "Enable shared memory usage" ON)
else()
option(REALM_USE_SHM "Enable shared memory usage" OFF)
endif()

if (UNIX)
# Look for memfd_create to see if we can use anonymous memory sharing
check_function_exists(memfd_create REALM_HAS_MEMFD)
Expand Down
9 changes: 0 additions & 9 deletions runtime/legion/legion_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18367,15 +18367,6 @@ namespace Legion {
bool from_application)
//--------------------------------------------------------------------------
{
for (int i = 0; runtime->safe_control_replication && from_application &&
(i < 2) && ((current_trace == NULL) || !current_trace->is_fixed()); i++)
{
Murmur3Hasher hasher(this, runtime->safe_control_replication > 1,i > 0);
hasher.hash(REPLICATE_DESTROY_FIELD_ALLOCATOR, __func__);
hasher.hash(node->handle, "handle");
if (hasher.verify(__func__))
break;
}
if (from_application)
{
AutoRuntimeCall call(this);
Expand Down
1 change: 0 additions & 1 deletion runtime/legion/legion_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -2353,7 +2353,6 @@ namespace Legion {
REPLICATE_DESTROY_LOGICAL_REGION,
REPLICATE_RESET_EQUIVALENCE_SETS,
REPLICATE_CREATE_FIELD_ALLOCATOR,
REPLICATE_DESTROY_FIELD_ALLOCATOR,
REPLICATE_EXECUTE_TASK,
REPLICATE_EXECUTE_INDEX_SPACE,
REPLICATE_REDUCE_FUTURE_MAP,
Expand Down
5 changes: 5 additions & 0 deletions runtime/legion/legion_profiling.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1736,6 +1736,11 @@ namespace Legion {

serializer->serialize(machine_desc);

LegionProfDesc::ZeroTime zero_time;
zero_time.zero_time = Legion::Runtime::get_zero_time();

serializer->serialize(zero_time);

for (unsigned idx = 0; idx < num_meta_tasks; idx++)
{
LegionProfDesc::MetaDesc meta_desc;
Expand Down
5 changes: 5 additions & 0 deletions runtime/legion/legion_profiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ namespace Legion {
unsigned node_id;
unsigned num_nodes;
};
struct ZeroTime {
public:
long long zero_time;
};

};

class LegionProfInstance {
Expand Down
26 changes: 26 additions & 0 deletions runtime/legion/legion_profiling_serializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ namespace Legion {
<< "num_nodes:unsigned:" << sizeof(unsigned)
<< "}" << std::endl;

ss << "ZeroTime {"
<< "id:" << ZERO_TIME_ID << delim
<< "zero_time:long long:" << sizeof(long long)
<< "}" << std::endl;

ss << "MemDesc {"
<< "id:" << MEM_DESC_ID << delim
<< "mem_id:MemID:" << sizeof(MemID) << delim
Expand Down Expand Up @@ -510,6 +515,18 @@ namespace Legion {
sizeof(machine_desc.num_nodes));
}

//--------------------------------------------------------------------------
void LegionProfBinarySerializer::serialize(
const LegionProfDesc::ZeroTime
&zero_time)
//--------------------------------------------------------------------------
{
int ID = ZERO_TIME_ID;
lp_fwrite(f, (char*)&ID, sizeof(ID));
lp_fwrite(f, (char*)&(zero_time.zero_time),
sizeof(zero_time.zero_time));
}

//--------------------------------------------------------------------------
void LegionProfBinarySerializer::serialize(
const LegionProfInstance::IndexSpacePointDesc &ispace_point_desc)
Expand Down Expand Up @@ -1593,6 +1610,15 @@ namespace Legion {
machine_desc.node_id, machine_desc.num_nodes);
}

//--------------------------------------------------------------------------
void LegionProfASCIISerializer::serialize(
const LegionProfDesc::ZeroTime
&zero_time)
//--------------------------------------------------------------------------
{
log_prof.print("Zero Time %lld", zero_time.zero_time);
}

//--------------------------------------------------------------------------
void LegionProfASCIISerializer::serialize(
const LegionProfInstance::TaskKind &task_kind)
Expand Down
6 changes: 5 additions & 1 deletion runtime/legion/legion_profiling_serializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace Legion {
virtual void serialize(const LegionProfDesc::OpDesc&) = 0;
virtual void serialize(const LegionProfDesc::MaxDimDesc&) = 0;
virtual void serialize(const LegionProfDesc::MachineDesc&) = 0;
virtual void serialize(const LegionProfDesc::ZeroTime&) = 0;
virtual void serialize(const LegionProfInstance::IndexSpacePointDesc&) = 0;
virtual void serialize(const LegionProfInstance::IndexSpaceRectDesc&) = 0;
virtual void serialize(const LegionProfInstance::IndexSpaceEmptyDesc&) = 0;
Expand Down Expand Up @@ -117,6 +118,7 @@ namespace Legion {
void serialize(const LegionProfDesc::OpDesc&);
void serialize(const LegionProfDesc::MaxDimDesc&);
void serialize(const LegionProfDesc::MachineDesc&);
void serialize(const LegionProfDesc::ZeroTime&);
void serialize(const LegionProfInstance::IndexSpacePointDesc&);
void serialize(const LegionProfInstance::IndexSpaceRectDesc&);
void serialize(const LegionProfInstance::IndexSpaceEmptyDesc&);
Expand Down Expand Up @@ -215,8 +217,9 @@ namespace Legion {
COPY_INST_INFO_ID,
FILL_INST_INFO_ID,
#ifdef LEGION_PROF_SELF_PROFILE
PROFTASK_INFO_ID
PROFTASK_INFO_ID,
#endif
ZERO_TIME_ID,
};
};

Expand All @@ -234,6 +237,7 @@ namespace Legion {
void serialize(const LegionProfDesc::OpDesc&);
void serialize(const LegionProfDesc::MaxDimDesc&);
void serialize(const LegionProfDesc::MachineDesc&);
void serialize(const LegionProfDesc::ZeroTime&);
void serialize(const LegionProfInstance::IndexSpacePointDesc&);
void serialize(const LegionProfInstance::IndexSpaceRectDesc&);
void serialize(const LegionProfInstance::IndexSpaceEmptyDesc&);
Expand Down
Loading

0 comments on commit 522ef64

Please sign in to comment.