diff --git a/.github/workflows/c-demos.yml b/.github/workflows/c-demos.yml index 468b2b47..c8998ee7 100644 --- a/.github/workflows/c-demos.yml +++ b/.github/workflows/c-demos.yml @@ -38,25 +38,28 @@ jobs: strategy: fail-fast: false matrix: - xpu: [ cpu ] - make_file: [ "Unix Makefiles" ] - machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios ] + device: [ best ] + machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-windows-arm64 ] include: - - xpu: gpu - machine: pv-linux - make_file: "Unix Makefiles" - - xpu: gpu - machine: pv-windows - make_file: "MinGW Makefiles" - - xpu: cpu - machine: pv-windows - make_file: "MinGW Makefiles" - - xpu: gpu - machine: pv-windows-igpu - make_file: "MinGW Makefiles" - - xpu: cpu - machine: pv-windows-arm64 - make_file: "MinGW Makefiles" + - machine: rpi4-32 + make_file: "Unix Makefiles" + - machine: rpi4-64 + make_file: "Unix Makefiles" + - machine: rpi5-32 + make_file: "Unix Makefiles" + - machine: rpi5-64 + make_file: "Unix Makefiles" + - machine: pv-windows-arm64 + make_file: "MinGW Makefiles" + - device: gpu + machine: pv-linux + make_file: "Unix Makefiles" + - device: gpu + machine: pv-windows + make_file: "MinGW Makefiles" + - device: gpu + machine: pv-ios + make_file: "Unix Makefiles" steps: - uses: actions/checkout@v3 @@ -88,4 +91,4 @@ jobs: run: python3 -m pip install -r test/requirements.txt - name: Test - run: python test/test_picollm_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.xpu}} + run: python test/test_picollm_c.py ${{secrets.PV_VALID_ACCESS_KEY}} ./phi2-290.pllm ${{matrix.device}} diff --git a/demo/c/README.md b/demo/c/README.md index d4a04546..642bcdad 100644 --- a/demo/c/README.md +++ b/demo/c/README.md @@ -85,7 +85,7 @@ Running the demo without arguments prints the usage: ```console Usage: ./demo/c/build/picollm_demo_completion -a ACCESS_KEY -l LIBRARY_PATH -m MODEL_PATH -[-d DEVICE] [-c COMPLETION_TOKEN_LIMIT] [-s STOP_PHRASES] [-e SEED] [-r PRESENCE_PENALTY] +[-y DEVICE] [-c COMPLETION_TOKEN_LIMIT] [-s STOP_PHRASES] [-e SEED] [-r PRESENCE_PENALTY] [-f FREQUENCY_PENALTY] [-o TOP_P] [-t TEMPERATURE] [-n MAX_OUTPUT_TOKENS] [-c NUM_TOP_CHOICES] [-v] [-h] -p PROMPT -v: enable verbose output diff --git a/demo/c/picollm_demo_completion.c b/demo/c/picollm_demo_completion.c index ea495e36..de4be89a 100644 --- a/demo/c/picollm_demo_completion.c +++ b/demo/c/picollm_demo_completion.c @@ -126,7 +126,7 @@ static void usage(const char *program) { (void) fprintf( stderr, "Usage: %s -a ACCESS_KEY -l LIBRARY_PATH -m MODEL_PATH " - "[-d DEVICE] [-s STOP_PHRASES] [-n MAX_OUTPUT_TOKENS] [-c NUM_TOP_CHOICES] " + "[-y DEVICE] [-s STOP_PHRASES] [-n MAX_OUTPUT_TOKENS] [-c NUM_TOP_CHOICES] " "[-r PRESENCE_PENALTY] [-f FREQUENCY_PENALTY] " "[-o TOP_P] [-t TEMPERATURE] [-e SEED] [-v] [-h] -p PROMPT\n" "-v: enable verbose output\n" @@ -161,7 +161,7 @@ static void progress_callback(const char *token, void *context) { } int picovoice_main(int argc, char **argv) { - const char *SHORT_OPTIONS = "a:l:m:d:c:s:e:r:f:o:t:n:c:p:vh"; + const char *SHORT_OPTIONS = "a:l:m:y:c:s:e:r:f:o:t:n:c:p:vh"; const char *access_key = NULL; const char *model_path = NULL; @@ -258,7 +258,7 @@ int picovoice_main(int argc, char **argv) { optind = i; } break; - case 'd': + case 'y': device_string = optarg; break; case 'v': diff --git a/demo/c/test/test_picollm_c.py b/demo/c/test/test_picollm_c.py index b1f6d5a9..527f8727 100644 --- a/demo/c/test/test_picollm_c.py +++ b/demo/c/test/test_picollm_c.py @@ -31,7 +31,7 @@ def test_picollm(self): "-a", self._access_key, "-l", pv_library_path("../../.."), "-m", self._model_path, - "-d", self._device, + "-y", self._device, "-p", "Instruct: Where is the capital city of British Columbia?\nOutput:", ] process = subprocess.Popen(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE)