Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      100 of 102

      Is it the math or the memory?

      A chip does compute_speed operations a second and, at the same time, moves memory_speed bytes a second between its memory and its math units. One step of a model needs work operations and bytes_moved bytes. Write step_time(work, bytes_moved, compute_speed, memory_speed): how many seconds the step takes.

      A chip has two workers that run at the same time: one does the math, one moves bytes in and out of memory. One step of a model needs some of each. Watch both workers go, then say how long the step takes. Chips swap in other kinds of step.

      A chip has two workers running at the same time: one does the math, one moves bytes.02040milliseconds →math worker30 trillion ops at 1000 trillion a secondmemory worker160 billion bytes at 4 trillion a secondthe step is done after?ms
      Your functionstep_time(work, bytes_moved, compute_speed, memory_speed)
      workoperations this step needse.g. 70000000000000
      bytes_movedbytes it needs to move in and out of memorye.g. 3200000000
      compute_speedoperations the chip does per seconde.g. 1000000000000000
      memory_speedbytes the chip moves per second, at the same time as the mathe.g. 4000000000000
      returnshow many seconds the step takes
      solution.pyLoading Python
      Sign in for an AI hint
      ← Fade to staticOne outlier ruins it →