Swift automatically detects AMP and exclude it from optimization. However in some cases it couldn’t be detected automatically. If you have issues with AMP version you can simply exclude it from caching/optimization.

Go to Settings > Caching > Exceptions and add /amp to exclude URLs.