Implement DeepSeek-R1 Code Analysis and Refactoring

implementationChallenge

Prompt Content

Using DeepSeek-R1, implement a core agent capability to analyze a provided PyTorch training loop and identify at least two common performance bottlenecks (e.g., inefficient data loading, CPU-GPU transfer issues, sub-optimal tensor operations). The agent should then propose concrete code changes to address these bottlenecks, providing a clear explanation for each. Focus on leveraging DeepSeek-R1's strengths in code understanding.

Try this prompt

Open the workspace to execute this prompt with free credits, or use your own API keys for unlimited usage.

Usage Tips

Copy the prompt and paste it into your preferred AI tool (Claude, ChatGPT, Gemini)

Customize placeholder values with your specific requirements and context

For best results, provide clear examples and test different variations