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

Getting rid of openpilot.common.numpy_fast #34368

Merged
merged 8 commits into from
Jan 14, 2025

Conversation

Sammohana
Copy link
Contributor

Removing openpilot.common.numpy_fast as per #34331

Copy link
Contributor

@adeebshihadeh adeebshihadeh left a comment

Choose a reason for hiding this comment

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

Got an opendbc PR as well? commaai/opendbc#1626

@@ -106,7 +106,7 @@ def _update_v_cruise_non_pcm(self, CS, enabled, is_metric):
if CS.gasPressed and button_type in (ButtonType.decelCruise, ButtonType.setCruise):
self.v_cruise_kph = max(self.v_cruise_kph, CS.vEgo * CV.MS_TO_KPH)

self.v_cruise_kph = clip(round(self.v_cruise_kph, 1), V_CRUISE_MIN, V_CRUISE_MAX)
self.v_cruise_kph =clip(round(self.v_cruise_kph, 1), V_CRUISE_MIN, V_CRUISE_MAX)
Copy link
Contributor

Choose a reason for hiding this comment

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

whitespace

@@ -2,7 +2,7 @@

from cereal import car
from openpilot.common.conversions import Conversions as CV
from openpilot.common.numpy_fast import clip
from numpy import clip
Copy link
Contributor

Choose a reason for hiding this comment

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

let's stick to import numpy as np and use np.clip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are you sure some source file like https://github.com/Sammohana/openpilot/tree/master/system/hardware/fan_controller.py are small and require only specific function. So I think it will only increase memory usage.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, let's keep it consistent

@adeebshihadeh adeebshihadeh merged commit 8eebce7 into commaai:master Jan 14, 2025
5 checks passed
@maxime-desroches
Copy link
Contributor

@fredyshox
Copy link
Contributor

@adeebshihadeh
Copy link
Contributor

Why does that matter for openpilot mem usage?

@fredyshox
Copy link
Contributor

oh nvm thats a different failure on my branch

@maxime-desroches
Copy link
Contributor

The memory increase is from the switch to tinygrad

@fredyshox
Copy link
Contributor

Fix for model_replay failures: #34383

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.

4 participants