File size: 707 Bytes
998922f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
library(ggplot2)
library(ggthemes)
library(openxlsx)
library(patchwork)
library(readr)
library(tidyverse)


df_mem <- read_csv("mxq-mem-bound-check.csv") |>
  mutate(
    memmb_delta = param_cnt * ((b1 + 2 * b2 / g1 + 32 / g1 / g2) - bit_budget) / 8 / 1024^2
  ) |>
  relocate(memmb_delta, .before = memmb) |>
  summarise(
    delta_tot = sum(memmb_delta),
    .by = c("model", "bit_budget", "attempt")
  )

df_mem2 <- read_csv("mxq-mem-bound-check.csv") |>
  summarise(
    memmb_tot = sum(memmb),
    param_quant_tot = sum(param_cnt),
    .by = c("model", "bit_budget", "attempt")
  ) |>
  mutate(
    theory_mem = param_quant_tot * bit_budget / 8 / 1024^2,
    within_bound = memmb_tot <= theory_mem
  )