开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
1 Star 0 Fork 3

xiongying/Halide

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
main
分支 (1093)
标签 (17)
main
xtensa-codegen
vksnk/dma-limit-channels
rootjalex/trs-codegen-cross
abadams/fix_7374
abadams/remove_hack_from_gpu_only_aottest
srj/gpu-cache
srj/generator_aot_gpu_multi_context_threaded
srj/xtensa-merge
abadams/vector_scan
abadams/fix_7365
darya-ver/ir-viz
vulkan-phase2-runtime
srj/param-map-deprecation
srj/rt-return-types
srj/main-vs2022
release/15.x
srj/param-map
abadams/ir_builder_unique_ptr
vksnk/restrict
v14.0.0
v13.0.4
v13.0.3
v13.0.2
v13.0.1
v13.0.0
v12.0.1
v12.0.0
v11.0.1
v11.0.0
v10.0.1
v10.0.0
release_2019_08_27
release_8.0.0
v8.0.0
release_2018_02_15
release_2013_11_11
main
分支 (1093)
标签 (17)
main
xtensa-codegen
vksnk/dma-limit-channels
rootjalex/trs-codegen-cross
abadams/fix_7374
abadams/remove_hack_from_gpu_only_aottest
srj/gpu-cache
srj/generator_aot_gpu_multi_context_threaded
srj/xtensa-merge
abadams/vector_scan
abadams/fix_7365
darya-ver/ir-viz
vulkan-phase2-runtime
srj/param-map-deprecation
srj/rt-return-types
srj/main-vs2022
release/15.x
srj/param-map
abadams/ir_builder_unique_ptr
vksnk/restrict
v14.0.0
v13.0.4
v13.0.3
v13.0.2
v13.0.1
v13.0.0
v12.0.1
v12.0.0
v11.0.1
v11.0.0
v10.0.1
v10.0.0
release_2019_08_27
release_8.0.0
v8.0.0
release_2018_02_15
release_2013_11_11
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
main
分支 (1093)
标签 (17)
main
xtensa-codegen
vksnk/dma-limit-channels
rootjalex/trs-codegen-cross
abadams/fix_7374
abadams/remove_hack_from_gpu_only_aottest
srj/gpu-cache
srj/generator_aot_gpu_multi_context_threaded
srj/xtensa-merge
abadams/vector_scan
abadams/fix_7365
darya-ver/ir-viz
vulkan-phase2-runtime
srj/param-map-deprecation
srj/rt-return-types
srj/main-vs2022
release/15.x
srj/param-map
abadams/ir_builder_unique_ptr
vksnk/restrict
v14.0.0
v13.0.4
v13.0.3
v13.0.2
v13.0.1
v13.0.0
v12.0.1
v12.0.0
v11.0.1
v11.0.0
v10.0.1
v10.0.0
release_2019_08_27
release_8.0.0
v8.0.0
release_2018_02_15
release_2013_11_11
Halide
/
src
/
runtime
/
errors.cpp
Halide
/
src
/
runtime
/
errors.cpp
errors.cpp 12.78 KB
一键复制 编辑 原始数据 按行查看 历史
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294
#include "HalideRuntime.h"
#include "printer.h"
extern "C" {
WEAK int halide_error_bounds_inference_call_failed(void *user_context, const char *extern_stage_name, int result) {
error(user_context)
<< "Bounds inference call to external stage " << extern_stage_name
<< " returned non-zero value: " << result;
return result;
}
WEAK int halide_error_extern_stage_failed(void *user_context, const char *extern_stage_name, int result) {
error(user_context)
<< "Call to external stage " << extern_stage_name
<< " returned non-zero value: " << result;
return result;
}
WEAK int halide_error_explicit_bounds_too_small(void *user_context, const char *func_name, const char *var_name,
int min_bound, int max_bound, int min_required, int max_required) {
error(user_context)
<< "Bounds given for " << var_name << " in " << func_name
<< " (from " << min_bound << " to " << max_bound
<< ") do not cover required region (from " << min_required
<< " to " << max_required << ")";
return halide_error_code_explicit_bounds_too_small;
}
WEAK int halide_error_bad_type(void *user_context, const char *func_name,
uint32_t type_given_bits, uint32_t correct_type_bits) {
halide_type_t correct_type, type_given;
memcpy(&correct_type, &correct_type_bits, sizeof(uint32_t));
memcpy(&type_given, &type_given_bits, sizeof(uint32_t));
error(user_context)
<< func_name << " has type " << correct_type
<< " but type of the buffer passed in is " << type_given;
return halide_error_code_bad_type;
}
WEAK int halide_error_bad_dimensions(void *user_context, const char *func_name,
int32_t dimensions_given, int32_t correct_dimensions) {
error(user_context)
<< func_name << " requires a buffer of exactly " << correct_dimensions
<< " dimensions, but the buffer passed in has " << dimensions_given << " dimensions";
return halide_error_code_bad_dimensions;
}
WEAK int halide_error_access_out_of_bounds(void *user_context, const char *func_name,
int dimension, int min_touched, int max_touched,
int min_valid, int max_valid) {
if (min_touched < min_valid) {
error(user_context)
<< func_name << " is accessed at " << min_touched
<< ", which is before the min (" << min_valid
<< ") in dimension " << dimension;
} else if (max_touched > max_valid) {
error(user_context)
<< func_name << " is accessed at " << max_touched
<< ", which is beyond the max (" << max_valid
<< ") in dimension " << dimension;
}
return halide_error_code_access_out_of_bounds;
}
WEAK int halide_error_buffer_allocation_too_large(void *user_context, const char *buffer_name, uint64_t allocation_size, uint64_t max_size) {
error(user_context)
<< "Total allocation for buffer " << buffer_name
<< " is " << allocation_size
<< ", which exceeds the maximum size of " << max_size;
return halide_error_code_buffer_allocation_too_large;
}
WEAK int halide_error_buffer_extents_negative(void *user_context, const char *buffer_name, int dimension, int extent) {
error(user_context)
<< "The extents for buffer " << buffer_name
<< " dimension " << dimension
<< " is negative (" << extent << ")";
return halide_error_code_buffer_extents_negative;
}
WEAK int halide_error_buffer_extents_too_large(void *user_context, const char *buffer_name, int64_t actual_size, int64_t max_size) {
error(user_context)
<< "Product of extents for buffer " << buffer_name
<< " is " << actual_size
<< ", which exceeds the maximum size of " << max_size;
return halide_error_code_buffer_extents_too_large;
}
WEAK int halide_error_constraints_make_required_region_smaller(void *user_context, const char *buffer_name,
int dimension,
int constrained_min, int constrained_extent,
int required_min, int required_extent) {
int required_max = required_min + required_extent - 1;
int constrained_max = constrained_min + constrained_extent - 1;
error(user_context)
<< "Applying the constraints on " << buffer_name
<< " to the required region made it smaller in dimension " << dimension << ". "
<< "Required size: " << required_min << " to " << required_max << ". "
<< "Constrained size: " << constrained_min << " to " << constrained_max << ".";
return halide_error_code_constraints_make_required_region_smaller;
}
WEAK int halide_error_constraint_violated(void *user_context, const char *var, int val,
const char *constrained_var, int constrained_val) {
error(user_context)
<< "Constraint violated: " << var << " (" << val
<< ") == " << constrained_var << " (" << constrained_val << ")";
return halide_error_code_constraint_violated;
}
WEAK int halide_error_param_too_small_i64(void *user_context, const char *param_name,
int64_t val, int64_t min_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at least " << min_val;
return halide_error_code_param_too_small;
}
WEAK int halide_error_param_too_small_u64(void *user_context, const char *param_name,
uint64_t val, uint64_t min_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at least " << min_val;
return halide_error_code_param_too_small;
}
WEAK int halide_error_param_too_small_f64(void *user_context, const char *param_name,
double val, double min_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at least " << min_val;
return halide_error_code_param_too_small;
}
WEAK int halide_error_param_too_large_i64(void *user_context, const char *param_name,
int64_t val, int64_t max_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at most " << max_val;
return halide_error_code_param_too_large;
}
WEAK int halide_error_param_too_large_u64(void *user_context, const char *param_name,
uint64_t val, uint64_t max_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at most " << max_val;
return halide_error_code_param_too_large;
}
WEAK int halide_error_param_too_large_f64(void *user_context, const char *param_name,
double val, double max_val) {
error(user_context)
<< "Parameter " << param_name
<< " is " << val
<< " but must be at most " << max_val;
return halide_error_code_param_too_large;
}
WEAK int halide_error_out_of_memory(void *user_context) {
// The error message builder uses malloc, so we can't use it here.
halide_error(user_context, "Out of memory (halide_malloc returned nullptr)");
return halide_error_code_out_of_memory;
}
WEAK int halide_error_buffer_argument_is_null(void *user_context, const char *buffer_name) {
error(user_context)
<< "Buffer argument " << buffer_name << " is nullptr";
return halide_error_code_buffer_argument_is_null;
}
WEAK int halide_error_debug_to_file_failed(void *user_context, const char *func,
const char *filename, int error_code) {
error(user_context)
<< "Failed to dump function " << func
<< " to file " << filename
<< " with error " << error_code;
return halide_error_code_debug_to_file_failed;
}
WEAK int halide_error_unaligned_host_ptr(void *user_context, const char *func,
int alignment) {
error(user_context)
<< "The host pointer of " << func
<< " is not aligned to a " << alignment
<< " bytes boundary.";
return halide_error_code_unaligned_host_ptr;
}
WEAK int halide_error_device_dirty_with_no_device_support(void *user_context, const char *func) {
error(user_context)
<< "The buffer " << func
<< " is dirty on device, but this pipeline was compiled "
<< "with no support for device to host copies.";
return halide_error_code_device_dirty_with_no_device_support;
}
WEAK int halide_error_host_is_null(void *user_context, const char *func) {
error(user_context)
<< "The host pointer of " << func
<< " is null, but the pipeline will access it on the host.";
return halide_error_code_host_is_null;
}
WEAK int halide_error_bad_fold(void *user_context, const char *func_name, const char *var_name,
const char *loop_name) {
error(user_context)
<< "The folded storage dimension " << var_name << " of " << func_name
<< " was accessed out of order by loop " << loop_name << ".";
return halide_error_code_bad_fold;
}
WEAK int halide_error_bad_extern_fold(void *user_context, const char *func_name,
int dim, int min, int extent, int valid_min, int fold_factor) {
if (min < valid_min || min + extent > valid_min + fold_factor) {
error(user_context)
<< "Cannot fold dimension " << dim << " of " << func_name
<< " because an extern stage accesses [" << min << ", " << (min + extent - 1) << "],"
<< " which is outside the range currently valid: ["
<< valid_min << ", " << (valid_min + fold_factor - 1) << "].";
} else {
error(user_context)
<< "Cannot fold dimension " << dim << " of " << func_name
<< " because an extern stage accesses [" << min << ", " << (min + extent - 1) << "],"
<< " which wraps around the boundary of the fold, "
<< "which occurs at multiples of " << fold_factor << ".";
}
return halide_error_code_bad_extern_fold;
}
WEAK int halide_error_fold_factor_too_small(void *user_context, const char *func_name, const char *var_name,
int fold_factor, const char *loop_name, int required_extent) {
error(user_context)
<< "The fold factor (" << fold_factor
<< ") of dimension " << var_name << " of " << func_name
<< " is too small to store the required region accessed by loop "
<< loop_name << " (" << required_extent << ").";
return halide_error_code_fold_factor_too_small;
}
WEAK int halide_error_requirement_failed(void *user_context, const char *condition, const char *message) {
error(user_context)
<< "Requirement Failed: (" << condition << ") " << message;
return halide_error_code_requirement_failed;
}
WEAK int halide_error_specialize_fail(void *user_context, const char *message) {
error(user_context)
<< "A schedule specialized with specialize_fail() was chosen: " << message;
return halide_error_code_specialize_fail;
}
WEAK int halide_error_no_device_interface(void *user_context) {
error(user_context) << "Buffer has a non-zero device but no device interface.\n";
return halide_error_code_no_device_interface;
}
WEAK int halide_error_device_interface_no_device(void *user_context) {
error(user_context) << "Buffer has a non-null device_interface but device is 0.\n";
return halide_error_code_device_interface_no_device;
}
WEAK int halide_error_host_and_device_dirty(void *user_context) {
error(user_context) << "Buffer has both host and device dirty bits set.\n";
return halide_error_code_host_and_device_dirty;
}
WEAK int halide_error_buffer_is_null(void *user_context, const char *routine) {
error(user_context) << "Buffer pointer passed to " << routine << " is null.\n";
return halide_error_code_buffer_is_null;
}
WEAK int halide_error_storage_bound_too_small(void *user_context, const char *func_name, const char *var_name,
int provided_size, int required_size) {
error(user_context)
<< "The explicit allocation bound (" << provided_size
<< ") of dimension " << var_name << " of " << func_name
<< " is too small to store the required region ("
<< required_size << ").";
return halide_error_code_storage_bound_too_small;
}
WEAK int halide_error_device_crop_failed(void *user_context) {
error(user_context) << "Buffer could not be cropped (runtime error or unimplemented device option).\n";
return halide_error_code_device_crop_failed;
}
} // extern "C"
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

MIT计算机科学和人工智能实验室的研究人员创造出一种专门设计简化图像处理的程序语言Halide,源代码托管在GitHub上,目前二进制程序只支持Mac OS X和Ubuntu 12
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/VisionDeveloper/Halide.git
git@gitee.com:VisionDeveloper/Halide.git
VisionDeveloper
Halide
Halide
main
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /