quic-sanirudh commented on code in PR #12204: URL: https://github.com/apache/tvm/pull/12204#discussion_r945435944
########## src/runtime/hexagon/ops/conv2d.h: ########## @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +#include <HAP_farf.h> +#include <tvm/runtime/c_runtime_api.h> +#include <tvm/runtime/device_api.h> + +#include <cassert> + +#ifndef TVM_RUNTIME_HEXAGON_OPS_CONV2D_H_ +#define TVM_RUNTIME_HEXAGON_OPS_CONV2D_H_ + +#ifdef DEBUG_CONV +#define DEBUG_BLOCK(X) \ + { X } +#define debug(...) FARF(ALWAYS, ##__VA_ARGS__) +#else +#define DEBUG_BLOCK(X) +#define debug(...) +#endif + +#define HAP_CALL(hap_fn, ...) \ + { \ + int rc = hap_fn(__VA_ARGS__); \ + if (rc != 0) { \ + debug("%s failed: rc=%x", #hap_fn, rc); \ + } \ + } Review Comment: @cconvey Thanks for the suggestion, I've moved them into the `tvm::runtime::hexagon` namespace and removed the HAP_CALL macro @csullivan I've modified all the debug messages to `LOG_INFO` calls, thanks for that suggestion. I did not know that this has been adapted to make FARF calls for hexagon already. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
