Skip to content

Add resnet20#25

Open
stamcenter wants to merge 10 commits into
fhe-benchmarking:mainfrom
stamcenter:add-resnet20
Open

Add resnet20#25
stamcenter wants to merge 10 commits into
fhe-benchmarking:mainfrom
stamcenter:add-resnet20

Conversation

@stamcenter

Copy link
Copy Markdown
Contributor

Adding the second pull request which contains the resnet-20 model as the reference for cifar10. It also include a modification to the harness that allow it to set mlp as default model for mnist and resnet20 as default model for cifar10.

@code-perspective
code-perspective self-requested a review June 15, 2026 05:32

@code-perspective code-perspective left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice! I was able to run this.

Can you rebase against main? Please only keep the cifar-10 and resnet20 models in this PR.

For reference, I got the measurement files (roughly takes 2 hours to run with the cifar-10 dataset load time).

{
  "model_name": "resnet20",
  "dataset_name": "cifar10",
  "Timing": {
    "Test dataset generation": "28.5534s",
    "Key Generation": "167.453s",
    "Encrypted model preprocessing": "0.0102s",
    "Input generation": "6.0968s",
    "Input preprocessing": "0.0073s",
    "Input encryption": "1.4808s",
    "Encrypted computation": "5256.1713s",
    "Result decryption": "1.0469s",
    "Result postprocessing": "0.0072s",
    "Total": "5460.8268s"
  },
  "Bandwidth": {
    "Public and evaluation keys": "50.4G",
    "Encrypted input": "28.0M",
    "Encrypted results": "8.0M"
  },
  "Server Reported": {}
}

Comment thread submissions/cifar10/include/fheon/UtilsData.h Outdated
Comment thread submissions/cifar10/src/server_preprocess_model.cpp
Comment thread submissions/cifar10/CMakeLists.txt Outdated
Comment thread submission_remote/mnist/client_decrypt_decode.py

@code-perspective code-perspective left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Some more comments

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

can you add this file to .gitignore so its no longer tracked.

Comment thread submissions/cifar10/CMakeLists.txt Outdated
endif()

# --------------------------------------------------------------------
# 4. Create mlp library

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Update comment

Comment thread submissions/cifar10/CMakeLists.txt Outdated
Comment on lines +85 to +87
# Use pre-built mlp_openfhe library
add_library( mlp_openfhe STATIC IMPORTED )
set_target_properties( mlp_openfhe PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../pre-built-library/libmlp_openfhe.a )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Remove?

Comment thread harness/utils.py
parser.add_argument('--remote', action='store_true',
help='Run example submission in remote backend mode')
parser.add_argument('--model', default='mlp', type=str,
parser.add_argument('--model', default=None, type=str,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Its ok for the default model to be mlp (since the default dataset=mnist)

Comment thread harness/run_submission.py

# 4. Client-side: Generate a new random input using harness/generate_input.py
cmd_args = [str(size),]
cmd_args = [str(size), "--dataset", dataset_name]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this needed?

@code-perspective code-perspective left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changing to request changes for a last few comments

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