Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

General performance and readability optimisation pass #16

Closed
wants to merge 3 commits into from

Conversation

rozukke
Copy link
Contributor

@rozukke rozukke commented Jun 28, 2024

Comments, reductions in bloat, file reading and IO optimisations

@rozukke rozukke added the enhancement New feature or request label Jun 28, 2024
@rozukke rozukke self-assigned this Jun 28, 2024
Copy link
Collaborator

@nhatdongdang nhatdongdang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes need to be made

src/main.c Outdated Show resolved Hide resolved
FILE* file = fopen(file_path, "rb");

// Offset into correct sector of array
fread(tensors + ((file_num - 1) * TENSOR_SIZE), TENSOR_SIZE, sizeof(f32), file);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current method for reading the input using a binary blob is causing issues with the CI tests. Please create a separate function specifically for reading the input using a binary blob. I recommend creating a corresponding target in the Makefile for this new method of reading input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather change the CI, since we definitely aren't sticking with txt for long

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CI works with any inputs located in the ./tensors folder. To ensure compatibility with the CI, we need to decide whether to convert all files in ./tensors to binary blobs.

src/matrix.c Show resolved Hide resolved
src/main.c Show resolved Hide resolved
@rozukke
Copy link
Contributor Author

rozukke commented Jul 2, 2024

Superseded by #21

@rozukke rozukke closed this Jul 2, 2024
@rozukke rozukke deleted the fix/optimisation-pass branch July 4, 2024 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants