haskell
haskell copied to clipboard
TensorData decoding problem with Nix package
I'm trying to get the Nix packaging for the Haskell bindings up to data, but the QueueTest fails. Here's some more info:
https://github.com/NixOS/nixpkgs/pull/119411
In particular, copying what I just wrote into the pull request:
The offsets for decoding strings seem to be out of whack. In QueueTest, the correct FFI.TensorData records for the strings look like this:
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,2,72,105]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,114]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,122]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,3,66,97,122]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,5,65,115,121,110,99]}
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [0,0,0,0,0,0,0,0,5,65,115,121,110,99]}
The broken ones I'm seeing look like this:
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [8,72,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [12,66,97,122,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
tensorData: TensorData {tensorDataDimensions = [], tensorDataType = DT_STRING, tensorDataBytes = [20,65,115,121,110,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}
dataBytes: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Feels like there's an offset of 8 going on.
Maybe somebody looking at it knows what's going on - help would be much appreciated!