Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
+ def config_sync(self, size, direc):
+ with open(self.class_path + '/sync_size', mode='w') as f:
+ f.write(str(size))
+ with open(self.class_path + '/sync_direction', mode='w') as f:
+ f.write(str(direc))
+
+ def sync_for_cpu(self):
+ with open(self.class_path + '/sync_for_cpu', mode='w') as f:
+ f.write(str(1))
+
+ def sync_for_device(self):
+ with open(self.class_path + '/sync_for_device', mode='w') as f:
+ f.write(str(1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment