• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright 2015 The TensorFlow Authors. All Rights Reserved.
2 
3 Licensed under the Apache License, Version 2.0 (the "License");
4 you may not use this file except in compliance with the License.
5 You may obtain a copy of the License at
6 
7     http://www.apache.org/licenses/LICENSE-2.0
8 
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14 ==============================================================================*/
15 
16 // This file contains declarations relating to kernel cache configuration
17 // parameters recognized by the StreamExecutor.
18 #ifndef TENSORFLOW_STREAM_EXECUTOR_KERNEL_CACHE_CONFIG_H_
19 #define TENSORFLOW_STREAM_EXECUTOR_KERNEL_CACHE_CONFIG_H_
20 
21 namespace stream_executor {
22 
23 // This enum represents potential configurations of L1/shared memory when
24 // running a particular kernel. These values represent user preference, and
25 // the runtime is not required to respect these choices.
26 enum class KernelCacheConfig {
27   // Indicates no preference for device L1/shared memory configuration.
28   kNoPreference,
29 
30   // Indicates a preference for more shared memory than L1 cache.
31   kPreferShared,
32 
33   // Indicates a preference for more L1 cache than shared memory.
34   kPreferL1,
35 
36   // Indicates a preference for equal amounts of L1 cache and shared memory.
37   kPreferEqual,
38 };
39 
40 }  // namespace stream_executor
41 
42 #endif  // TENSORFLOW_STREAM_EXECUTOR_KERNEL_CACHE_CONFIG_H_
43