Skip to content

Expand the size of the matrix #1

Description

@leankemski

Hi, I tried to change the dimensions for matrix A and B into 1000*1000, and I just changed the size of matrix in mmilt.hpp and sharedmem.py. It did not work, the result of the matrix was wrong. Here are the codes I changed, the board I used is PYNQ-Z1. Can you tell me what else should I change, thx.
in mmult.hpp
// Dimensions for A and B (which determine C)
#define A_ROWS 1000
#define A_COLS 1000
#define B_ROWS A_COLS
#define B_COLS 1000
in sharedmem.py
__MMULT_A_SHAPE = (1000, 1000)
__MMULT_BT_SHAPE = (1000, 1000)
__MMULT_C_SHAPE = (1000, 1000)
(https://user-images.githubusercontent.com/34908328/49782331-deaeaa80-fd50-11e8-8177-13a968a5ca57.png)

I also want to know if i change the type to float would the ip work correctly?

Activity

  1. drichmond commented on Dec 12, 2018

    @drichmond
    Owner
  2. leankemski commented on Dec 13, 2018

    @leankemski
    Author

    Did you re-compile the overlay?
    …
    On Dec 10, 2018, at 10:30 PM, leankemski @.**> wrote: I tried to change the dimensions for matrix A and B into 10001000, and I just changed the size of matrix in mmilt.hpp and sharedmem.py. It did not work, the result of the matrix was wrong. Here are the codes I changed, the board I used is PYNQ-Z1. Can you tell me what else should I change, thx. in mmult.hpp // Dimensions for A and B (which determine C) #define A_ROWS 1000 #define A_COLS 1000 #define B_ROWS A_COLS #define B_COLS 1000 in sharedmem.py __MMULT_A_SHAPE = (1000, 1000) __MMULT_BT_SHAPE = (1000, 1000) __MMULT_C_SHAPE = (1000, 1000) (https://user-images.githubusercontent.com/34908328/49782331-deaeaa80-fd50-11e8-8177-13a968a5ca57.png https://user-images.githubusercontent.com/34908328/49782331-deaeaa80-fd50-11e8-8177-13a968a5ca57.png) — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1>, or mute the thread https://github.com/notifications/unsubscribe-auth/AGFUdF3j5mw7pdtileBH5F4PPL2HFd-Pks5u31EBgaJpZM4ZMwES.

    Yes, I re-compiled the overlay according to the tutorial.

  3. drichmond commented on Dec 13, 2018

    @drichmond
    Owner
  4. leankemski commented on Dec 14, 2018

    @leankemski
    Author

    Increase the delay in sharedmem.py. I think your matrix is taking longer than 1 second to multiply
    …

    Thank you. I changed delay to 100, it worked for a 300 matrix. But for a matrix of 1000, it should be more longer. I think if I change the type into float, it will be much worse. Will the mmult perform better if I unroll the loop? There is no accerlerlated computation now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions