How to generate schedule

本文介绍了一个具体的数据库操作流程,包括使用正确的参数运行SQL脚本、完成预算预测导入、部门工作负载任务导入及收入单位预测导入等三项任务,并依据Generateschedule_Official.xls文件指示继续执行剩余任务。此外还提到了预测依赖于前一周的数据以及计划安排依赖于本周预测。

1.run the sql script with the correct parameter

sqlplus -s dbuser/dbpass@SID @lasddl.sql LOCATION_NAME DATE

2.finish following 3 tasks:

a.Budget Forecast Import
b. Dept Wrkld Tasks Import
c. Revenue Unit Projections Import

3.run the left  tasks follow the Generate schedule_Official.xls

begin with step2

 

memo:

forcasting depends on last week forcasting

and the schedule depends on this week's forcasting!

class cuda: # CUDA arch to use for CUDA template kernel compilation. # e.g. "70", "75", "80", "90", etc. # When arch is None, Inductor uses torch.cuda.get_device_capability(0). arch: Optional[str] = None # CUDA version to use for CUDA template kernel compilation. # e.g. "11.4", "12.1", etc. # When version is None, Inductor uses torch.version.cuda. version: Optional[str] = None # Optimization level for the host compiler. compile_opt_level: Literal["-O0", "-O1", "-O2", "-O3", "-OS"] = "-O1" # Whether to enable device LTO (link-time-optimization). enable_cuda_lto = False # Whether to keep intermediate files dring compilation. enable_ptxas_info = False # Whether to enable debug info, e.g. line number, cutlass debug info. enable_debug_info = False # Whether to use fast math. use_fast_math = False # Path to the CUTLASS repo root directory. # The default path only works under PyTorch local development environment. cutlass_dir = os.environ.get( "TORCHINDUCTOR_CUTLASS_DIR", os.path.abspath( os.path.join(os.path.dirname(torch.__file__), "../third_party/cutlass/") ), ) # Configures the maximum number of CUTLASS configs to profile in max_autotune. # By default it's None, so that all CUTLASS configs are tuned. # This is mainly used to reduce test time in CI. cutlass_max_profiling_configs: Optional[int] = None # The L2 swizzle values to consider when profiling CUTLASS configs in max_autotune. cutlass_max_profiling_swizzle_options: list[int] = [1, 2, 4] # Path to CUDA NVCC. # NVCC search order: # 1) cuda_cxx set in this config # 2) CUDACXX environment variable # 3) CUDA_HOME environment variable # 4) default system search PATH. cuda_cxx: Optional[str] = None # Minimum value of M*N*K to consider the CUTLASS backend for GEMM ops. cutlass_backend_min_gemm_size: int = 1 # enable generation of inline standalone runner in CUDA CPP generated code # which allows to compile the generated code into a standalone executable. generate_test_runner: bool = ( os.environ.get("INDUCTOR_CUDA_BACKEND_GENERATE_TEST_RUNNER_CODE", "0") == "1" ) # Keep only Cutlass op configs which contain this regular expression pattern # Set this to "warpspecialized_cooperative_epi_tma" to enable only SM90 TMA Cutlass Kernels for large GEMMs cutlass_op_allowlist_regex: Optional[str] = os.environ.get( "TORCHINDUCTOR_CUTLASS_ALLOWLIST" ) # Note: Names of Cutlass ops names can be obtained by calling # op.configuration_name() on a Cutlass op instance, for example those # returned from cutlass_utils.gen_ops() or the op argument passed to # CUTLASSGemmTemplate.render(...) # Filter Cutlass configs which contain this regular expression pattern # Set this to "pingpong" to avoid numerical issues # caused by the op ordering of the "pingpong" memory access # pattern used by some Cutlass Kernels. cutlass_op_denylist_regex: Optional[str] = os.environ.get( "TORCHINDUCTOR_CUTLASS_DENYLIST" ) # Non-negative integer which determines how many kernels are instantiated. # 0 = 0000 generates the fewest kernels, 9999 generates all possible combinations. # increasing first digit reduces schedule / mixed type pruning, # increasing second digit generates more cluster sizes, # increasing third digit generates more MMA multipliers, # increasing fourth digit generates more instruction shapes. cutlass_instantiation_level: str = os.environ.get( "TORCHINDUCTOR_CUTLASS_INSTANTIATION_LEVEL", "0" )
最新发布
06-12
<think>嗯...用户这次提出的问题非常具体,是关于CUDA配置参数的优化调整。用户可能是个在做GPU加速开发的工程师,正在调试性能问题。从ta直接点出arch/version等专业参数来看,应该有一定CUDA基础。注意到用户引用了交叉编译和TVM部署的内容(引用1和2),可能是在做嵌入式场景的AI部署?结合ta要"适配特定环境"的需求,应该是遇到了跨平台兼容性问题。不过用户明确表示引用仅供参考,重点还是CUDA参数。用户提到的四个参数确实很关键:-arch(架构)控制PTX代码生成,比如sm_80对应安培架构-version(版本)影响API兼容性,需要和驱动匹配-compile_opt_level(优化级别)就是熟悉的-O0/-O3-enable_cuda_lto(链接时优化)这个比较冷门但对性能提升明显特别要注意用户提到的"适配特定环境"——如果目标设备是Jetson这类嵌入式GPU,arch必须选对(比如tx2对应sm_62),而且编译优化不宜过高。上次有个案例就是在Orin上调-O3导致寄存器溢出...需要重点解释参数组合策略,比如低功耗设备建议-O2+LTO,高性能卡可以用-O3。对了,还得提醒用户用nvcc--help查看具体arch支持列表,避免硬编不支持的特性。</think> 了解您在CUDA配置中优化参数的需求。以下是关键参数的详细说明及使用指南: --- ### **CUDA 配置类核心参数说明** #### **1. `arch` (计算架构)** - **作用**:指定目标GPU的计算能力(如 `sm_80` = Ampere架构)。 - **使用场景**: - 编译时添加 `-arch=sm_XX` (如 `-arch=sm_86` 适配RTX 30系列) - **多架构兼容**:通过 `-arch=compute_XX -code=sm_XX,sm_YY` 生成多版本PTX代码 - **优化建议**: 若目标设备统一(如服务器集群),指定最高计算能力;若需跨代兼容,启用 `compute_XX` 生成通用PTX。 #### **2. `version` (CUDA版本)** - **作用**:控制API/功能兼容性(如 `12.0` = CUDA 12)。 - **使用方法**: `-ccbin` 指定主机编译器版本(如 `-ccbin=g++-11`),避免编译器与CUDA版本冲突[^3]。 - **注意**:低版本驱动无法运行高版本编译的二进制(如Driver < 525 无法运行CUDA 12.2的kernel)。 #### **3. `compile_opt_level` (优化等级)** - **作用**:编译器优化强度(类似GCC的 `-O0` ~ `-O3`)。 - **层级说明**: | 等级 | 优化强度 | 适用场景 | |---|---|---| | `-O0` | 无优化 | 调试(保留符号) | | `-O1` | 基础优化 | 开发阶段 | | `-O2` | 平衡优化 | 默认推荐 | | `-O3` | 激进优化 | 性能关键代码(可能增加编译时间) | #### **4. `enable_cuda_lto` (链接时优化)** - **作用**:启用LTO(Link-Time Optimization),跨文件优化代码。 - **启用方法**: ```bash nvcc -dlto -Xcompiler -flto # 需主机编译器支持(如GCC 8.0+) ``` - **优势**: 提升5%~15%性能(尤其对小型kernel),但显著增加编译时间和内存占用[^1]。 --- ### **参数组合实战示例** #### **适配嵌入式设备(如Jetson)** ```bash nvcc main.cu -o app \ -arch=sm_87 \ # Jetson Orin 架构 -O2 \ # 平衡优化 -ccbin=g++-10 \ # 指定兼容的GCC版本 --ptxas-options=-v \ # 输出寄存器/共享内存用量 --compiler-options=-Wall # 启用所有警告 ``` #### **服务器端高性能编译** ```bash nvcc kernel.cu -o server_app \ -arch=compute_90 -code=sm_90,sm_80,sm_75 \ # 兼容Ampere/Turing -O3 -dlto -Xcompiler=-flto \ # 启用LTO --use_fast_math \ # 启用快速数学优化 --ptxas-options=-O3 \ # PTX汇编层优化 ``` --- ### **常见问题排查** 1. **架构不匹配错误** ✅ 方案:通过 `deviceQuery` 检查GPU真实计算能力([CUDA Samples](https://github.com/NVIDIA/cuda-samples))。 2. **LTO编译失败** ✅ 方案:升级GCC至≥8.0,确保主机编译器支持 `-flto`[^3]。 3. **版本兼容性问题** ✅ 方案:通过 `-forward-unknown-to-host-compiler` 传递主机编译器参数。 --- ### **进阶工具** - **NSight Compute**:分析kernel性能瓶颈(指令级优化) - **`nvprof`/`ncu`**:检测寄存器溢出(`local_mem_overhead`指标) - **PTXAS优化选项**:`--ptxas-options=-O3,-v` 输出详细资源占用 > 关键调整原则:**从默认配置开始(-O2 + 单arch),逐步启用LTO/多架构支持,使用Profiling工具验证优化效果**。 [^1]: 例如嵌入式场景可通过 `--disable-asm` 规避指令集兼容问题(如ARMv7不支持AVX) [^2]: TVM部署实践表明编译器选项对GPU算子调度影响显著 [^3]: GCC链接器参数对CUDA LTO有直接约束 [^4]: 环境适配需匹配基础架构(如GraalVM的多平台组件配置) --- ### 相关问题 1. **如何检测CUDA程序中的寄存器溢出问题?** 2. **启用LTO后编译时间显著增加,如何平衡性能与开发效率?** 3. **跨代GPU架构(如Maxwell到Ampere)如何保证二进制兼容性?** 4. **`--use_fast_math` 启用后会影响哪些数学函数的精度?**
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值