-
Notifications
You must be signed in to change notification settings - Fork 525
Enable Consistent SHA256 Hashing with reduced Planner Context #3091
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
base: main
Are you sure you want to change the base?
Conversation
This pull request was exported from Phabricator. Differential Revision: D76303748 |
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
This pull request was exported from Phabricator. Differential Revision: D76303748 |
eb425d8
to
2d29d80
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
2d29d80
to
7034b2d
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
2 similar comments
This pull request was exported from Phabricator. Differential Revision: D76303748 |
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
7034b2d
to
10d8108
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
10d8108
to
ecba624
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D76303748 |
ecba624
to
d14d02c
Compare
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
This pull request was exported from Phabricator. Differential Revision: D76303748 |
d14d02c
to
c94ff70
Compare
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Differential Revision: D76303748
This pull request was exported from Phabricator. Differential Revision: D76303748 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Reviewed By: micrain Differential Revision: D76303748
c94ff70
to
d2f5fd4
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D76303748 |
…h#3091) Summary: Pull Request resolved: pytorch#3091 Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs. This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances. To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation. Namely: * enumerator.enumerate(...)'s output - which is used as the `search_space` in both LP and OSS planner * We are storing the output of enumerate as an attribute `last_stored_search_space`. **This assumes enumerate will have been called before we hash the planner context inputs**. * StorageResveration's policy (aka whether `HeuristicalStorageReservation` is used or `FixedStorageReservation` * StorageResveration's initialization attributes: * _percentage * _parameter_multiplier for HeuristicalStorageReservation * _dense_tensor_estimate for HeuristicalStorageReservation Created helper functions: * `hash_planner_context_inputs` to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272) * `hash_sha256_to_int` to be passed in as the default hash function in hash_planner_context_inputs Also created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input. Reviewed By: micrain Differential Revision: D76303748
d2f5fd4
to
76eb8e3
Compare
This pull request was exported from Phabricator. Differential Revision: D76303748 |
Summary:
Even though SHA256 hashing is used, we're still not seeing the expected same hash generated from the original planner context inputs.
This problem is due to Enumerator and Storage Reservation objects we were originally trying to hash containing attributes that differ between processes/instances.
To resolve this we reduced the hashing context to only use the specific attributes we need from enumerator and storage reservation.
Namely:
search_space
in both LP and OSS plannerlast_stored_search_space
. This assumes enumerate will have been called before we hash the planner context inputs.HeuristicalStorageReservation
is used orFixedStorageReservation
Created helper functions:
hash_planner_context_inputs
to be called in both planner.hash_planner_context_inputs and manifold loading call site (see D75723272)hash_sha256_to_int
to be passed in as the default hash function in hash_planner_context_inputsAlso created a multiprocess unit test to quickly check if consistent hashes are being generated across different processes given the same input.
Differential Revision: D76303748