Skip to content
Snippets Groups Projects
README.md 6.93 KiB
Newer Older
  • Learn to ignore specific revisions
  • Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    # Physical Computing Design Tools
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ![](02_Presentation/191202_demo.png)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ## Description
    Repository for DICE design tools explorations.
    
    Topics include:
    - Programming strategies for spacial computing
        - Data flow programming and [Distributed Deep Neural Networks](https://gitlab.cba.mit.edu/amiraa/ddnn)
        - Physics Simulation 
        - Trusted Systems
    - Reconfiguration strategies for DICE pieces 
        - CAM tools and path planing:
            - Desktop (external) assembler 
            - Swarm assembly and manipulation
    
    ----
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ## Demo Links
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - **"Physical Computing Interface"** 
      - [Assembler Control Demo](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/index.html)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
      - [Voxel Simulation Demo](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/indexSimulation.html)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
      - [Convolutional Neural Network (CNN) Demo](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/demos/indexDNN.html)
    
    - **"Performance Calculation Graph"** demo lives [here.](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/probabilisticProjections/index.html)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [Distributed Deep Neural Networks](https://gitlab.cba.mit.edu/amiraa/ddnn)
    
    - UR10 voxel Assembly [demo.](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/assembly/standAloneAssembly.html)
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ----
    ## Progress
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ### Demo Videos
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ![](02_Presentation/191202_demo.mp4)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ![](02_Presentation/assemblerFirstTrial.mp4)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ---
    
    ### Applications
    - The most effieceint applications for dice are those who need reconfiguration white running, examples:
      - probabilistic programming (Gamalon)
      - more computing power while assembling voxels
      - Neural Networks?
      
    #### Voxel Simulation
    
    ![](02_Presentation/200114_simulation.PNG)
    
    #### Convolutional Neural Networks
    
    ![](02_Presentation/200508_CNN.png)
    
    ----
    
    ### Capabilities and Updates
    -  Design
        -  Parametric grid definition (cubic, hexagonal, dice)
    -  Assembly/timeline
        -  Timeline for future morphing computing
        -  UR10 
    -  Graph
        -  Hierarchy
        -  Automatic neighborhood
        -  highlights
    -  Computing
        -  Asynchronous code propagation (distributed max example)
        -  Simple test case find max value distributed
        -  Min cut max flow concept study neighborhood 
    -  Improved UI and integration
        -  Radial menu
        -  Json propagation
        -  Highlight selected node
      
    ---
    
    
    ### Hardware Architecture Inference
    
    #### Probabilistic Programming
    
    - [Gamalon](https://gamalon.com/)
    - Using Dice pieces to do **inference** 
      - in order to find the best configuration based on its performance
      - other tasks
    - [WebPPL: ](http://webppl.org/)  probabilistic programming for the web
    - Probabilistic Graphical Models
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ![](02_Presentation/pp.png)
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ![](02_Presentation/ppp.png)
    
    In order to map the hardware architecture to an input dataflow program or computation graph, I modeled the hardware and software models as  probabilistic graphical model, and used probabilistic programming to infer the best hardware architecture choices that will optimize the speed, energy and cost of the system.
    
    I used [WebPPL](http://dippl.org/chapters/02-webppl.html) a probabilistic programming language in javascript. I model the variables I want to infer as if they come from different types of distributions that integrate our priors in them. In the following example I am using markov chain monte carlo as an inference method.
    
    [The demo lives here.](https://amiraa.pages.cba.mit.edu/physical-computing-design-tools/01_Code/physical_computing_interface/probabilisticProjections/index.html)
    
    The structure of the probabilistic program looks like this:
    
    ```javascript
    var model=function (){
    
      var chipType=function () {	return uniformDraw(["STM32F412","samd51j19","samd51j20","MAX32660","STM32F412","XMEGA"])};
      var chip=processors.type[chipType()];
      //display(chip.name);
    
      var ram=chip.ram;
      var cyclesPerSecond =chip.cyclesPerSecond;
      var bitsPerSecond   =chip.bitsPerSecond  ;
      var costPerChip     =chip.costPerChip    ;
      var flopsPerWatt    =chip.flopsPerWatt   ;
    
      var interconnect=mem(function (model) {	return uniformDraw([2,4,6])});
      var nodesNumber= mem(function (model) {	return uniformDraw([10,20,30,40,50])});
    
      var dataExchangeSize=mem(function (model) {return gaussian(1e3, 10)}); 
      var memoryPerComputation=mem(function (model) {return gaussian(10e3, 10)}); 
      var numberofComputations=mem(function (model) {return gaussian(200, 10)}); //nodes of similar computations
      var computation = mem(function (model) {return gaussian(100, 20)});  
      var maxNumberOfInterconnects= mem(function (model) {return gaussian(10, 2)}); 
    
      doCalculation();
    
    
      var speed=computationTime+communicationTime; //frame
      var cost=nodesNumber("DICE")*costPerChip;
      var energy= 1 / flopsPerWatt*numberofNodesNeeded*computationTime;//per frame
    
    
      condition(speed<0.0012 && cost<180);
      // return [speed,cost,energy]
    
      if(result==1){
        return chip.name;
    
      }else if(result==2){
        return interconnect("DICE");
    
      }else{
        return nodesNumber("DICE");
      }
    }
    
    var result=3;
    var options = {method: 'MCMC', kernel: 'MH', samples: 10000}
    var dist = Infer(options, model)
    viz(dist)
    
    display('Expected nodesNumber: ' + expectation(dist))
    expectation(dist)
    ```
    Until now I have a dummy computation model. Next steps would be to get a complex computational graph and for each part infer the best hardware architecture for it. Moreover, if the computation graph changes through time one can also alter the hardware architecture to respond to these changes.
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ---
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ## Desired Milestones
    
    - [ ] Assembly
      - [ ] Swarm construction
    - [ ] Computation
      - [ ] Morphing code
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
      - [ ] Real simulation/message passing analysis
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
      - [ ] Computation Optimization
        - [ ] Restructuring code and automatically divide into distributed
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
        - [ ] show alternatives and bottlenecks
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [ ] Auto compilation/export to dice modules
    - [ ] Simulation portal
    - [ ] Case Studies
      - [ ] Neural networks
      - [ ] Bayesian optimization
      - [ ] Distributed optimization
      - [ ] Voxel design
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [ ] Scaling
      - [ ] stress testing scaling
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    ## TODOS:
    
    - [x] Grid Systems
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [ ] Documentation
      - [ ] in depth documentation of how to do everything
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [ ] Reset Grid/button
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed
    - [ ] Assembly
      - [ ] fix errors
    - [ ] Add real Dice info
      - [ ] computation delay and communaction cost
      - [ ] CAD?
    - [ ] Select
      - [ ] improve selected visualization
      - [ ] when selecting group show bounding box
    - [ ] Hierarchy
      - [ ] place multiple voxels
      - [ ] change code of mutiple voxels
      - [ ] select multiple dice pieces
      - [ ] create groups
    
    - [ ] Bugs:
      - [ ] change grid like Jiri's
      - [ ] fix assembler
      - [ ] when remove node pix pickup list
        - [ ] get the pickup list from occupancy
    
    Amira Abdel-Rahman's avatar
    Amira Abdel-Rahman committed