-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Conversation
There was a problem hiding this 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
selfdrive/car/cruise.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
selfdrive/car/cruise.py
Outdated
@@ -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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
This broke model replay on master https://jenkins.comma.life/blue/organizations/jenkins/openpilot/detail/master/169/pipeline#step-338-log-31 |
Memory usage is up from 65 to 75, after fixing migration: https://jenkins.comma.life/blue/organizations/jenkins/openpilot/detail/migration-fix-long-plan-migration/1/pipeline |
Why does that matter for openpilot mem usage? |
oh nvm thats a different failure on my branch |
The memory increase is from the switch to tinygrad |
Fix for model_replay failures: #34383 |
Removing openpilot.common.numpy_fast as per #34331