Skip to content

Commit

Permalink
rev 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pouya Rostam committed May 8, 2024
1 parent 68c3fbb commit 8cd1e61
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
matrix:
xpu: [ cpu ]
make_file: [ "Unix Makefiles" ]
machine: [ rpi3-32, rpi3-64, rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios ]
machine: [ rpi4-32, rpi4-64, rpi5-32, rpi5-64, pv-linux, pv-ios ]
include:
- xpu: gpu
machine: pv-linux
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ models. picoLLM Inference Engine is:
- Private; LLM inference runs 100% locally.
- Cross-Platform
- Linux (x86_64), macOS (arm64, x86_64), and Windows (x86_64)
- Raspberry Pi (5, 4, and 3)
- Raspberry Pi (5 and 4)
- Android and iOS
- Chrome, Safari, Edge, and Firefox
- Runs on CPU and GPU
Expand Down
6 changes: 1 addition & 5 deletions binding/python/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def _pv_linux_machine() -> str:
except Exception as e:
raise RuntimeError("Failed to identify the CPU with `%s`\nCPU info: `%s`" % (e, cpu_info))

if '0xd03' == cpu_part:
return 'cortex-a53' + arch_info
elif '0xd08' == cpu_part:
if '0xd08' == cpu_part:
return 'cortex-a72' + arch_info
elif "0xd0b" == cpu_part:
return "cortex-a76" + arch_info
Expand All @@ -62,10 +60,8 @@ def _pv_platform() -> Tuple[str, str]:
_PV_SYSTEM, _PV_MACHINE = _pv_platform()

_RASPBERRY_PI_MACHINES = {
"cortex-a53",
"cortex-a72",
"cortex-a76",
"cortex-a53-aarch64",
"cortex-a72-aarch64",
"cortex-a76-aarch64"
}
Expand Down
4 changes: 1 addition & 3 deletions demo/c/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Compatibility

- C99-compatible compiler
- Runs on Linux (x86_64), macOS (arm64, x86_64), Windows (x86_64), and Raspberry Pi (5, 4, and 3).
- Runs on Linux (x86_64), macOS (arm64, x86_64), Windows (x86_64), and Raspberry Pi (5 and 4).

## Requirements

Expand Down Expand Up @@ -108,8 +108,6 @@ where `${LIBRARY_PATH}` is the path to the Picovoice library file corresponding
| Raspberry Pi 5 (64-bit) | lib/raspberry-pi/cortex-a76-aarch64/libpv_picollm.so |
| Raspberry Pi 4 | lib/raspberry-pi/cortex-a76/libpv_picollm.so |
| Raspberry Pi 4 (64-bit) | lib/raspberry-pi/cortex-a76-aarch64/libpv_picollm.so |
| Raspberry Pi 3 | lib/raspberry-pi/cortex-a53/libpv_picollm.so |
| Raspberry Pi 3 (64-bit) | lib/raspberry-pi/cortex-a53-aarch64/libpv_picollm.so |

#### Windows

Expand Down
10 changes: 3 additions & 7 deletions demo/c/picollm_demo_completion.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,18 +255,14 @@ int picovoice_main(int argc, char **argv) {
exit(EXIT_FAILURE);
}

const char *(*pv_status_to_string_func)(pv_status_t) =
load_symbol(dl_handle, "pv_status_to_string");
const char *(*pv_status_to_string_func)(pv_status_t) = load_symbol(dl_handle, "pv_status_to_string");
if (!pv_status_to_string_func) {
print_dl_error("failed to load `pv_status_to_string`");
exit(EXIT_FAILURE);
}

pv_status_t (*pv_picollm_init_func)(
const char *,
const char *,
const char *,
pv_picollm_t **) = load_symbol(dl_handle, "pv_picollm_init");
pv_status_t (*pv_picollm_init_func)(const char *, const char *, const char *, pv_picollm_t **) =
load_symbol(dl_handle, "pv_picollm_init");
if (!pv_picollm_init_func) {
print_dl_error("failed to load `pv_picollm_init`");
exit(EXIT_FAILURE);
Expand Down
6 changes: 1 addition & 5 deletions demo/c/test/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ def _pv_linux_machine() -> str:
except Exception as e:
raise RuntimeError("Failed to identify the CPU with `%s`\nCPU info: `%s`" % (e, cpu_info))

if '0xd03' == cpu_part:
return 'cortex-a53' + arch_info
elif '0xd08' == cpu_part:
if '0xd08' == cpu_part:
return 'cortex-a72' + arch_info
elif "0xd0b" == cpu_part:
return "cortex-a76" + arch_info
Expand All @@ -62,10 +60,8 @@ def _pv_platform() -> Tuple[str, str]:
_PV_SYSTEM, _PV_MACHINE = _pv_platform()

_RASPBERRY_PI_MACHINES = {
"cortex-a53",
"cortex-a72",
"cortex-a76",
"cortex-a53-aarch64",
"cortex-a72-aarch64",
"cortex-a76-aarch64"
}
Expand Down
Binary file removed lib/raspberry-pi/cortex-a53-aarch64/libpv_picollm.so
Binary file not shown.
Binary file removed lib/raspberry-pi/cortex-a53/libpv_picollm.so
Binary file not shown.

0 comments on commit 8cd1e61

Please sign in to comment.