Skip to content

Conversation

@iccuevas
Copy link
Collaborator

[Issue #16]
I've parameterize the AVX support using #ifdef AVX_SUPPORT. But I need some help updating the Makefile in order to avoid compiling the Jasmin AVX files
To enable AVX support, the C program has to be compiled using -DAVX_SUPPORT (we can also change the name)

@iccuevas
Copy link
Collaborator Author

iccuevas commented May 6, 2025

I believe all AVX dependencies are now completely splitted by AVX_SUPPORT flag. To enable AVX support, the code has to be compiled using DAVX_SUPPORT C flag.

make run-ref won't compile code/files with AVX support

@iccuevas iccuevas requested a review from sarranz May 6, 2025 15:49
@sarranz
Copy link
Collaborator

sarranz commented May 7, 2025

This looks great, thanks! I have a question: do you know if compiling the dependencies with -march=native -mavx2 can cause trouble? We do this in https://github.com/formosa-crypto/jasmin-tutorial/blob/98fba54cb8da1022193cd43175583e07df35cf2e/flake.nix#L25C1-L25C53

printf("Run tests for Gimli.\n");
printf("\nRun tests for Gimli.\n");
printf("Usage: %s TESTYPE\n", name);
#ifdef AVX_SUPPORT
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would just wrap the whole thing inside the ifdef and not mention TESTTYPE at all if there is only one option. i.e., when AVX2 is disabled. Do you think this is a good idea? Also, it would be nice to add a sentence that says "run all the tests for gimli" or something similar.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants