dgarrett-synaptics commited on
Commit
6ac2374
·
verified ·
1 Parent(s): a07db18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -17
app.py CHANGED
@@ -37,8 +37,8 @@ def compile_model(model_name, vmem_value, lpmem_value):
37
  with tempfile.TemporaryDirectory() as out_dir:
38
  print(f"Created temporary directory: {out_dir}")
39
 
40
- vmem_size_limit = int(vmem_value * 1024)
41
- lpmem_size_limit = int(lpmem_value * 1024)
42
 
43
  # Run the model fitter
44
  success, results = sr100_model_compiler.sr100_model_optimizer(
@@ -48,28 +48,14 @@ def compile_model(model_name, vmem_value, lpmem_value):
48
  )
49
  print(results)
50
 
51
- # Analyze the model
52
- #default_config = sr100_model_compiler.sr100_default_config()
53
-
54
- #default_config['sram_size'] = int(float(sram_size)*1.0e6)
55
- #default_config['core_clock'] = int(float(clock)*1.0e6)
56
- #success, perf_data = sr100_model_compiler.sr100_check_model(results=results, config=default_config)
57
-
58
  output_text = ''
59
  if success:
60
  output_text = 'SUCCESS, model fits on SR100'
61
  else:
62
  output_text = 'FAILULRE model does not fit on SR100'
63
  for key, value in results.items():
64
- output_text += f'<br>{key} = {value}'
65
 
66
- # try:
67
- # epochs = int(epochs_text)
68
- # batch = int(batch_text)
69
- # except Exception as e:
70
- # epochs = 100
71
- # batch = 16
72
- # print(f'ERROR converting {epochs_text}, and {batch_text}')
73
  return output_text
74
 
75
  # Get all available models
 
37
  with tempfile.TemporaryDirectory() as out_dir:
38
  print(f"Created temporary directory: {out_dir}")
39
 
40
+ vmem_size_limit = int(vmem_value * 1024000)
41
+ lpmem_size_limit = int(lpmem_value * 1024000)
42
 
43
  # Run the model fitter
44
  success, results = sr100_model_compiler.sr100_model_optimizer(
 
48
  )
49
  print(results)
50
 
 
 
 
 
 
 
 
51
  output_text = ''
52
  if success:
53
  output_text = 'SUCCESS, model fits on SR100'
54
  else:
55
  output_text = 'FAILULRE model does not fit on SR100'
56
  for key, value in results.items():
57
+ output_text += f'<br> {key} = {value}'
58
 
 
 
 
 
 
 
 
59
  return output_text
60
 
61
  # Get all available models