This paper aims at offering a new perspective on automatic performance tuning. We present a system, ISAAC, which does not produce a fixed set of tuning parameters per se, but rather a function that maps input characteristics to such parameters. We show that this function can be automatically learned from empirical benchmarking **data** using standard machine learning techniques (i.e., multi-layer perceptron), and propose a simple statistical method to speed-up the synthesis of a proper training dataset. An important addition of our framework is the use of a relatively low-level intermediate language (i.e., NVIDIA PTX), as opposed to higher-level alternatives typically used in similar systems (i.e., C, CUDA or OpenCL). While this is not strictly necessary and restricts our numerical experiments to NVIDIA GPUs only, this strategic choice leads to (1) better code generation, (2) faster compilation, and (3) more accurate performance models (due to simpler instruction selection heuristics).