38255d2af1
* put flash attention behind flag for now * add test * remove print * up timeout for sheduler tests
23 lines
470 B
Go
23 lines
470 B
Go
package envconfig
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestConfig(t *testing.T) {
|
|
Debug = false // Reset whatever was loaded in init()
|
|
t.Setenv("OLLAMA_DEBUG", "")
|
|
LoadConfig()
|
|
require.False(t, Debug)
|
|
t.Setenv("OLLAMA_DEBUG", "false")
|
|
LoadConfig()
|
|
require.False(t, Debug)
|
|
t.Setenv("OLLAMA_DEBUG", "1")
|
|
LoadConfig()
|
|
require.True(t, Debug)
|
|
t.Setenv("OLLAMA_FLASH_ATTENTION", "1")
|
|
LoadConfig()
|
|
require.True(t, FlashAttention)
|
|
}
|