[Caffe2] SquaredL2Distance as output layer of CNN network. Error: Exception when creating gradient for [Cast]

This issue looks similar to the one reported on AIX with RNN sample script for caffe2 - Issue with caffe2 port on to AIX

System Information:

  • PyTorch Version (e.g., 1.0): Caffer2 tag v0.4.0
  • OS (e.g., Linux): AIX
  • How you installed PyTorch (conda, pip, source): Build from source (tag v0.4.0)
  • Build command you used (if compiling from source):
  • Python version: Python 2.7
  • CUDA/cuDNN version: NA
  • GPU models and configuration: NA

Any pointers on this will be helpful.