Search Results for

    Show / Hide Table of Contents

    Class ParallelScheduler

    Constructs a schedule for multiprocessor execution given a task graph.

    Inheritance
    Object
    ParallelScheduler
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Compiler.Graphs
    Assembly: Microsoft.ML.Probabilistic.Compiler.dll
    Syntax
    public class ParallelScheduler

    Fields

    BuildTreeImbalanceThreshold

    Lower values speed up scheduling but create more stages.

    Declaration
    public int BuildTreeImbalanceThreshold
    Field Value
    Type Description
    Int32

    FillIdleSlots

    If true, each stage is pruned until the remaining nodes have no idle slots when sorted by height.

    Declaration
    public bool FillIdleSlots
    Field Value
    Type Description
    Boolean

    LoggingAction

    Declaration
    public Action<string> LoggingAction
    Field Value
    Type Description
    Action<String>

    PruningImbalanceThreshold

    Must be non-negative. Larger values lead to fewer stages.

    Declaration
    public int PruningImbalanceThreshold
    Field Value
    Type Description
    Int32

    Methods

    AddEdge(Int32, Int32)

    Declaration
    public int AddEdge(int source, int target)
    Parameters
    Type Name Description
    Int32 source
    Int32 target
    Returns
    Type Description
    Int32

    ContainsEdge(Int32, Int32)

    Declaration
    public bool ContainsEdge(int source, int target)
    Parameters
    Type Name Description
    Int32 source
    Int32 target
    Returns
    Type Description
    Boolean

    ConvertToSchedulePerProcess(Int32[][][])

    Renumbers the nodes in a schedule to be process-local.

    Declaration
    public static int[][][] ConvertToSchedulePerProcess(int[][][] schedulePerThread)
    Parameters
    Type Name Description
    Int32[][][] schedulePerThread
    Returns
    Type Description
    Int32[][][]

    ConvertToSchedulePerProcess(Int32[][][], ParallelScheduler.NodeLocation[], out List<Int32>[][], out List<Int32>[][])

    Declaration
    public static void ConvertToSchedulePerProcess(int[][][] schedulePerThread, ParallelScheduler.NodeLocation[] locations, out List<int>[][] nodeIndicesToSend, out List<int>[][] nodeIndicesToReceive)
    Parameters
    Type Name Description
    Int32[][][] schedulePerThread
    ParallelScheduler.NodeLocation[] locations
    List<Int32>[][] nodeIndicesToSend
    List<Int32>[][] nodeIndicesToReceive

    ConvertToSchedulePerThread(IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>>, Int32)

    Convert [stage][block][item] into [thread][stage][item]

    Declaration
    public int[][][] ConvertToSchedulePerThread(IReadOnlyList<IReadOnlyList<IReadOnlyList<int>>> schedule, int threadCount)
    Parameters
    Type Name Description
    IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>> schedule
    Int32 threadCount
    Returns
    Type Description
    Int32[][][]

    ConvertToSchedulePerThreadFast(IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>>, Int32)

    Convert [stage][block][item] into [thread][block][item]

    Declaration
    public int[][][] ConvertToSchedulePerThreadFast(IReadOnlyList<IReadOnlyList<IReadOnlyList<int>>> schedule, int threadCount)
    Parameters
    Type Name Description
    IReadOnlyList<IReadOnlyList<IReadOnlyList<Int32>>> schedule
    Int32 threadCount
    Returns
    Type Description
    Int32[][][]

    CreateGraph(IReadOnlyList<Int32[]>)

    Declaration
    public void CreateGraph(IReadOnlyList<int[]> variablesUsedByNode)
    Parameters
    Type Name Description
    IReadOnlyList<Int32[]> variablesUsedByNode

    GetDistributedCommunicationInfos(Int32[][][])

    Declaration
    public DistributedCommunicationInfo[] GetDistributedCommunicationInfos(int[][][] schedulePerProcess)
    Parameters
    Type Name Description
    Int32[][][] schedulePerProcess
    Returns
    Type Description
    DistributedCommunicationInfo[]

    GetDistributedCommunicationInfos(Int32[][][], IReadOnlyList<Int32[]>)

    Declaration
    public static DistributedCommunicationInfo[] GetDistributedCommunicationInfos(int[][][] schedulePerProcess, IReadOnlyList<int[]> variablesUsedByNode)
    Parameters
    Type Name Description
    Int32[][][] schedulePerProcess
    IReadOnlyList<Int32[]> variablesUsedByNode
    Returns
    Type Description
    DistributedCommunicationInfo[]

    GetDistributedCommunicationInfos(Int32[][][], IReadOnlyList<Int32[]>, out Dictionary<Int32, Int32>[])

    Declaration
    public static DistributedCommunicationInfo[] GetDistributedCommunicationInfos(int[][][] schedulePerProcess, IReadOnlyList<int[]> variablesUsedByNode, out Dictionary<int, int>[] processLocalIndexOfArrayIndexForProcess)
    Parameters
    Type Name Description
    Int32[][][] schedulePerProcess
    IReadOnlyList<Int32[]> variablesUsedByNode
    Dictionary<Int32, Int32>[] processLocalIndexOfArrayIndexForProcess
    Returns
    Type Description
    DistributedCommunicationInfo[]

    GetHeights()

    Get an array where array[node] is the height of a node in the dependency graph.

    Declaration
    public int[] GetHeights()
    Returns
    Type Description
    Int32[]

    GetMedianMinBlockSize(Int32[][][])

    Declaration
    public static double GetMedianMinBlockSize(int[][][] schedulePerThread)
    Parameters
    Type Name Description
    Int32[][][] schedulePerThread

    [process][stageIndex][indexInBlock]

    Returns
    Type Description
    Double

    GetMedianMinBlockSize(Int32[][][][], out Double)

    Declaration
    public static double GetMedianMinBlockSize(int[][][][] schedulePerThreadInProcess, out double medianThreadStages)
    Parameters
    Type Name Description
    Int32[][][][] schedulePerThreadInProcess
    Double medianThreadStages
    Returns
    Type Description
    Double

    GetSchedulePerThreadInProcess(Int32[][], IReadOnlyList<Int32[]>, Int32, Action<String>)

    Declaration
    public static int[][][][] GetSchedulePerThreadInProcess(int[][] scheduleForProcess, IReadOnlyList<int[]> variablesUsedByNodeInProcess, int numThreads, Action<string> loggingAction = null)
    Parameters
    Type Name Description
    Int32[][] scheduleForProcess
    IReadOnlyList<Int32[]> variablesUsedByNodeInProcess
    Int32 numThreads
    Action<String> loggingAction
    Returns
    Type Description
    Int32[][][][]

    GetScheduleWithBarriers(Int32)

    Declaration
    public List<List<List<int>>> GetScheduleWithBarriers(int degreeOfParallelism)
    Parameters
    Type Name Description
    Int32 degreeOfParallelism
    Returns
    Type Description
    List<List<List<Int32>>>

    GetScheduleWithBarriers1(Int32)

    Get a schedule where all blocks have size 1

    Declaration
    public List<List<List<int>>> GetScheduleWithBarriers1(int degreeOfParallelism)
    Parameters
    Type Name Description
    Int32 degreeOfParallelism
    Returns
    Type Description
    List<List<List<Int32>>>

    [stage][block][item]

    NewNode()

    Declaration
    public int NewNode()
    Returns
    Type Description
    Int32

    ScheduleHasConflict(Int32[][][], IReadOnlyList<Int32[]>)

    Declaration
    public static bool ScheduleHasConflict(int[][][] schedulePerThread, IReadOnlyList<int[]> variablesUsedByNode)
    Parameters
    Type Name Description
    Int32[][][] schedulePerThread
    IReadOnlyList<Int32[]> variablesUsedByNode
    Returns
    Type Description
    Boolean

    WriteSchedule(IEnumerable<IEnumerable<IReadOnlyCollection<Int32>>>, Boolean)

    Declaration
    public static void WriteSchedule(IEnumerable<IEnumerable<IReadOnlyCollection<int>>> schedule, bool blockCounts = false)
    Parameters
    Type Name Description
    IEnumerable<IEnumerable<IReadOnlyCollection<Int32>>> schedule
    Boolean blockCounts

    WriteStage(IEnumerable<IReadOnlyCollection<Int32>>, Boolean)

    Declaration
    public static void WriteStage(IEnumerable<IReadOnlyCollection<int>> stage, bool blockCounts = false)
    Parameters
    Type Name Description
    IEnumerable<IReadOnlyCollection<Int32>> stage
    Boolean blockCounts

    WriteThreadSchedule(Int32[][][])

    Declaration
    public static void WriteThreadSchedule(int[][][] blocksOfThread)
    Parameters
    Type Name Description
    Int32[][][] blocksOfThread
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.