1/**
2 * Copyright (c) Glow Contributors. See CONTRIBUTORS file.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifdef GLOW_WITH_CPU
17
18void CPUMaxSplatInst::verify() const {
19 assert(getSrc()->getType() == getDest()->getType() && "Invalid type");
20 assert(getSrc()->dims() == getDest()->dims() && "Invalid shape");
21}
22
23void CPUConvDKKC8Inst::verify() const {
24 assert(getSrc()->dims()[3] % getGroup() == 0 &&
25 "Input channels must be divisible by group.");
26 assert(getDest()->dims()[3] % getGroup() == 0 &&
27 "Output channels must be divisible by group.");
28 assert(getDest()->getElementType() == getSrc()->getElementType() &&
29 "Invalid Element Type");
30 assert(getDest()->getElementType() == getFilter()->getElementType() &&
31 "Invalid Element Type");
32 assert(getDest()->getElementType() == getBias()->getElementType() &&
33 "Invalid Element Type");
34}
35
36#endif // GLOW_WITH_CPU
37