Huawei Hackathon 2021 - Sweden (Stockholm)

Overview

huawei-hackathon-2021

Contributors

banner

Challenge

Requirements:

  • python=3.8.10
  • Standard libraries (no importing)

Important factors:

Data dependency between tasks for a Directed Acyclic Graph (DAG).

Task waits until parent tasks finished and data generated by parent reaches current task.

Communication time: The time which takes to send the parents’ data to their children, if they are located on different processing nodes; otherwise it can be assumed negligible. As a result, we prefer to assign communicating tasks on the same processing node.

Assign tasks on the same processing node where possible; if not, make data transfers from parent -> children as fast as possible.

Affinity: It refers to the affinity of a task to its previous instances running on the same processing node that can reduce overhead to initialize the task, such as a lower Instruction Cache Miss. Ideally the task is better to run on the same processing node where its previous instance was recently run.

Reuse processing nodes where possible. I.e. run children tasks on parent node.

Load Balancing of processing nodes: The CPU utilization of processing nodes should be balanced and uniformed.

Self explanitory.

Assumptions

  1. If communicating tasks assigned to the same processing node, the communication time between them is negligible, i.e., equal to 0.

    Using same node reduces communication time to 0.

  2. If the previous instance of the same task is recently assigned to the same processing node, the estimated execution time of the current instance of the task reduces by 10%. For example, if T0 is assigned to PN1, the execution time of the second instance of T0 (denoted by T0’) on PN1 is 9µs, rather than 10µs.

    Using same node reduces processing time by 10%. PN1 = Processing Node 1. T0 = Task 0.

  3. "Recently assigned" can be translated to:
    • If the previous instance of the current task is among the last Χ tasks run on the PN.
    • For this purpose we need to keep, a history of the X recent tasks which run on each PN.

      Log the tasks tracked?

  4. A DAG’s deadline is relative to its release time which denoted by di . For example, if the deadline of a DAG is 3 and the release time of its ith instance is 12, it should be completed before 15.
  5. All time units are in microseconds.
  6. The execution of tasks are non-preemptive, in the sense that a task that starts executing on a processor will not be interrupted by other tasks until its execution is completed.

    Tasks cannot run concurrently on the same processor.

Problem Formulation

Consider a real-time app including n DAGs (DAG1, DAG2, ... DAGn) each of which are periodically released with a period Pk . Instances of each DAG is released over the course of the running application. The ith instance of the kth DAG is denoted by Dk(i). The application is run on x homogenous processing nodes (PN1, PN2, ... PNx). The algorithm should find a solution on how to assign the tasks of DAGs to the PNs so that all DAGs deadlines are respected and the makespan of the given application is minimized. Makespan: The time where all instances of DAGs are completed

Questions:

Propose an algorithm to solve the considered problem to maximize the utility function including both the total application Makespan and the standard deviation of the PN utilizations (i.e., how well-uniform is the assignment) such that both task dependency constraints and DAGs deadlines are met.

Utility Function = 1 / (10 * Normalized(Makespan) + STD(PN utilizations))
Normalized(Makespan) = Makespan / Application_worst_case_completion_time
Application_worst_case_completion_time = SUM(execution_times, DAG_communication_times)
Normalized(Makespan) and STD(PN utilizations) are both values [0..1] Algorithm should specify the assignment of tasks to PNs that maximize utility function. Algorithm should specify the order the tasks are scheduled and execution order of tasks for each PN.

I/O

Input

Scheduler input: 12 test cases consisting of a JSON file that includes:

  • A set of independent DAGs
  • The deadlines for the DAGs
  • Number of instances of each DAG
  • Period (Pk) of the DAGs
  • List of tasks for each DAG
  • Execution times for each DAG
  • Communication (inter-task) times for each DAG __ --> Number of cores mentioned in each test case <--__

Output

A CSV file including:

  • The PN_id of which each task was assigned to (0, 1, ... x)
  • Order of execution of the tasks in their assigned PN
  • Start and finish time of the task
  • Applcation markspan
  • The STD of the clusters' utilization (PN utilization?)
  • Value of the utility function
  • The execution time of the scheduler on our machine.

image

Note for Python coders: If you code in Python, you need to write your own printer function to create the csv files in the specified format.

Owner
Drake Axelrod
Student at University of Göteborg studying Software Engineering & Management.
Drake Axelrod
A Comprehensive Empirical Study of Vision-Language Pre-trained Model for Supervised Cross-Modal Retrieval

CLIP4CMR A Comprehensive Empirical Study of Vision-Language Pre-trained Model for Supervised Cross-Modal Retrieval The original data and pre-calculate

24 Dec 26, 2022
Reinforcement Learning for Portfolio Management

qtrader Reinforcement Learning for Portfolio Management Why Reinforcement Learning? Learns the optimal action, rather than models the market. Adaptive

Angelos Filos 406 Jan 01, 2023
An SE(3)-invariant autoencoder for generating the periodic structure of materials

Crystal Diffusion Variational AutoEncoder This software implementes Crystal Diffusion Variational AutoEncoder (CDVAE), which generates the periodic st

Tian Xie 94 Dec 10, 2022
Flaxformer: transformer architectures in JAX/Flax

Flaxformer is a transformer library for primarily NLP and multimodal research at Google.

Google 116 Jan 05, 2023
[peer review] An Arbitrary Scale Super-Resolution Approach for 3D MR Images using Implicit Neural Representation

ArSSR This repository is the pytorch implementation of our manuscript "An Arbitrary Scale Super-Resolution Approach for 3-Dimensional Magnetic Resonan

Qing Wu 19 Dec 12, 2022
Tensorflow AffordanceNet and AffContext implementations

AffordanceNet and AffContext This is tensorflow AffordanceNet and AffContext implementations. Both are implemented and tested with tensorflow 2.3. The

Beatriz Pérez 6 Dec 01, 2022
A collection of random and hastily hacked together scripts for investigating EU-DCC

A collection of random and hastily hacked together scripts for investigating EU-DCC

Ryan Barrett 8 Mar 01, 2022
Configure SRX interfaces with Scrapli

Configure SRX interfaces with Scrapli Overview This example will show how to configure interfaces on Juniper's SRX firewalls. In addition to the Pytho

Calvin Remsburg 1 Jan 07, 2022
A python script to lookup Passport Index Dataset

visa-cli A python script to lookup Passport Index Dataset Installation pip install visa-cli Usage usage: visa-cli [-h] [-d DESTINATION_COUNTRY] [-f]

rand-net 16 Oct 18, 2022
Model of an AI powered sign language interpreter.

TEXT AND SPEECH TO SIGN LANGUAGE. A web application which takes in text or live audio speech recording as input, converts and displays the relevant Si

Mark Gatere 4 Mar 30, 2022
Tutorials and implementations for "Self-normalizing networks"

Self-Normalizing Networks Tutorials and implementations for "Self-normalizing networks"(SNNs) as suggested by Klambauer et al. (arXiv pre-print). Vers

Institute of Bioinformatics, Johannes Kepler University Linz 1.6k Jan 07, 2023
InsightFace: 2D and 3D Face Analysis Project on MXNet and PyTorch

InsightFace: 2D and 3D Face Analysis Project on MXNet and PyTorch

Deep Insight 13.2k Jan 06, 2023
Face2webtoon - Despite its importance, there are few previous works applying I2I translation to webtoon.

Despite its importance, there are few previous works applying I2I translation to webtoon. I collected dataset from naver webtoon 연애혁명 and tried to transfer human faces to webtoon domain.

이상윤 64 Oct 19, 2022
A motion detection system with RaspberryPi, OpenCV, Python

Human Detection System using Raspberry Pi Functionality Activates a relay on detecting motion. You may need following components to get the expected R

Omal Perera 55 Dec 04, 2022
Add-on for importing and auto setup of character creator 3 character exports.

CC3 Blender Tools An add-on for importing and automatically setting up materials for Character Creator 3 character exports. Using Blender in the Chara

260 Jan 05, 2023
buildseg is a building extraction plugin of QGIS based on PaddlePaddle.

buildseg buildseg is a building extraction plugin of QGIS based on PaddlePaddle. TODO Extract building on 512x512 remote sensing images. Extract build

Yizhou Chen 11 Sep 26, 2022
Free course that takes you from zero to Reinforcement Learning PRO 🦸🏻‍🦸🏽

The Hands-on Reinforcement Learning course 🚀 From zero to HERO 🦸🏻‍🦸🏽 Out of intense complexities, intense simplicities emerge. -- Winston Churchi

Pau Labarta Bajo 260 Dec 28, 2022
Large dataset storage format for Pytorch

H5Record Large dataset ( 100G, = 1T) storage format for Pytorch (wip) Support python 3 pip install h5record Why? Writing large dataset is still a

theblackcat102 43 Oct 22, 2022
This codebase is the official implementation of Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization (NeurIPS2021, Spotlight)

Test-Time Classifier Adjustment Module for Model-Agnostic Domain Generalization This codebase is the official implementation of Test-Time Classifier A

47 Dec 28, 2022
MMGeneration is a powerful toolkit for generative models, based on PyTorch and MMCV.

Documentation: https://mmgeneration.readthedocs.io/ Introduction English | 简体中文 MMGeneration is a powerful toolkit for generative models, especially f

OpenMMLab 1.3k Dec 29, 2022