add tests for cpu serialization