Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add cpu_threads settings in cortex extension #4386

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Jan 2, 2025

Describe Your Changes

This PR made a minor change, where the cortex extension should also display the cpt_threads settings (which are optional).

Context:

  1. As a user, I don't want Jan to consume all my CPU resources. It should be limited to a few threads in some cases.
  2. When I enable Vulkan with AMD GPUs, my CPU still runs at 100%, it's a known issue from engine side. These settings may help addressing that.

CleanShot 2025-01-02 at 13 03 30@2x

Scenarios:

  1. In a fresh launch, I don't set anything or invalid setting, it shouldn't send the settings.
    CleanShot 2025-01-02 at 13 07 04@2x

  2. When I set a number, it should send to the engine
    CleanShot 2025-01-02 at 13 07 43@2x

Changes made

This pull request includes several updates and improvements to the inference-cortex-extension. The changes focus on updating the engine version, adding a new configuration option, and ensuring proper handling of this new configuration in the codebase.

Key Changes:

Version Update:

  • Updated the ENGINE_VERSION from 0.1.42 to 0.1.42-hotfix in download.bat, download.sh, and rollup.config.ts to ensure the latest hotfix is used. [1] [2] [3]

Configuration Enhancements:

  • Added a new setting cpu_threads to the default_settings.json to allow users to specify the number of CPU threads for inferencing in CPU mode.
  • Included cpu_threads in the Settings enum and handled its initialization and usage in index.ts. [1] [2] [3] [4] [5]

UI Improvement:

  • Removed an unnecessary condition in the Advanced settings screen to simplify the UI logic.

@github-actions github-actions bot added the type: chore Maintenance, operational label Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

Barecheck - Code coverage report

Total: 68.71%

Your code coverage diff: 0.00% ▴

✅ All code changes are covered

Copy link
Contributor

github-actions bot commented Jan 2, 2025

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@louis-jan louis-jan merged commit 5127df4 into main Jan 2, 2025
25 of 26 checks passed
@louis-jan louis-jan deleted the chore/add-cpu-threads-cortex-extension-settings branch January 2, 2025 06:30
@github-actions github-actions bot added this to the v0.5.14 milestone Jan 2, 2025
Copy link
Contributor

github-actions bot commented Jan 2, 2025

This is the build for this pull request. You can download it from the Artifacts section here: Build URL.

@imtuyethan imtuyethan modified the milestones: v0.5.14, v0.5.13 Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Maintenance, operational
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants