Skip to content
lianzhiluPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

WarCache

This repository is an open-source artifact of WarCache. WarCache is an automated code refactoring framework based on specific runtime cache features.

Installation

  1. Install the required WebAssembly environment. You can refer to the following links to install the environment one by one.
  1. Clone the repository
git clone https://github.com/lianzhilu/warcache.git
cd warcache
  1. Install the required dependencies
pip install -r requirements.txt
  1. Set the environment variables
export API_KEY=your_api_key
export WASI_PATH=/path/to/wasi-sdk/bin

Usage

Confirm Cache Feature

Run the program in the crs_benchmark/ directory under the target WASM runtime. The shortest time-consuming strategy can be confirmed as the best feature of the runtime.

Cache Friendliness Scoring

To score programs based on a specific cache feature, run the following command:

python score.py --feature <cache_feature> --input <program_dir> --output <score_output_dir>
  • <cache_feature>: The cache feature to evaluate against (e.g., "lru", "lfu", "mru", "fifo").
  • <program_dir>: The directory containing the programs to be scored.
  • <score_output_dir>: The directory to store the scoring results.

Code Refactoring

To refactor programs to be more cache-friendly and compatible with a specific WASM runtime, run the following command:

python refactor.py --feature <cache_feature> --runtime <wasm_runtime> --input <program_dir> --output <refactor_output_dir>
  • <cache_feature>: The cache feature to optimize for (e.g., "lru", "lfu", "mru", "fifo").
  • <wasm_runtime>: The target WASM runtime (e.g., "wasmer", "wasmtime", "wasm3", "wamr", "wasmedge").
  • <program_dir>: The directory containing the programs to be refactored.
  • <refactor_output_dir>: The directory to store the refactored programs and response files.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages